[GRASS-dev] pythonlib: map
Martin Landa
landa.martin at gmail.com
Thu Dec 30 14:11:51 EST 2010
2010/12/30 Glynn Clements <glynn at gclements.plus.com>:
>> most of the functions from python scripting library use parameter
>> named 'map'. It's reserved word in python, in the result it's
>> complicated to use e.g. map() fn. I would suggest to replace this
>> parameter by 'name' or something similar.
>
> Parameter names only matter within the function itself, so it's only
> an issue if you want to use the built-in "map" function within a
> function with a parameter named "map" (e.g. for consistency with other
> functions). In which case, you can use __builtins__.map, use a list
> comprehension, copy the parameter then "del(map)", etc.
>
> FWIW, I've yet to encounter an actual problem with using "map" as a
> parameter or variable name. Likewise for min, max, file, type, input,
> etc.
Right, that's question. To keep parameter consistency with GRASS
modules has probably the higher priority. I have modified
vector_what() in this regard.
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list