[Mapserver-dev] Lists of objects...

Sean Gillies sgillies at frii.com
Fri Dec 12 10:45:46 EST 2003


It's too bad [] is already taken, because otherwise us Python users 
could
do this:

 >>> list = ['CITY', 'VILLAGE']
 >>> classobj.expression = '[ATTRIBUTE] IN ' + str(list)
 >>> print classobj.expression
 >>> [ATTRIBUTE] IN ['CITY', 'VILLAGE']

Can we use [] for the target list and have it mean differently when it 
follows
'IN' or 'in'?  I don't know what's possible with the lexer.  {} would be
simpler for sure.

Sean

On Friday, December 12, 2003, at 08:05  AM, 
Jean-Francois.Doyon at CCRS.NRCan.gc.ca wrote:

> Steve,
>
> Being a Python guy, I just love the "in" statement indeed ... {} seem 
> to
> make sense, it's kind of perl-ish :)
>
> So something like:
>
> EXPRESSION "[ATTRIBUTE] IN { 'CITY', 'VILLAGE' }"
>
> ??
>
> Yup, I like it ... much more elegant than a bunch of "OR"'s, and such 
> forms
> of expressions I think average users will find quite intuitive and 
> easy to
> learn/understand.
>
> J.F.
>
> -----Original Message-----
> From: mapserver-dev-admin at lists.gis.umn.edu
> [mailto:mapserver-dev-admin at lists.gis.umn.edu]On Behalf Of Steve Lime
> Sent: Thursday, December 11, 2003 5:15 PM
> To: mapserver-dev at lists.gis.umn.edu
> Subject: [Mapserver-dev] Lists of objects...
>
>
> Anyone have an opinion on how we might denote lists in map files?
> Initially I'm thinking about the IN operator for MapServer expressions
> but lists might be useful in other places like for SHAPEPATH. Given 
> that
> []'s and ()'s already have significance to the lexer {}'s might be
> useful. Thoughts?
>
> Steve
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
>




More information about the mapserver-dev mailing list