[GRASS-dev] [GRASS GIS] #2441: Underscore to avoid Python keywords used improperly in grass.script
GRASS GIS
trac at osgeo.org
Sun Oct 5 19:23:54 PDT 2014
#2441: Underscore to avoid Python keywords used improperly in grass.script
-------------------------------------------+--------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: PEP8, python keywords, parser | Platform: Unspecified
Cpu: Unspecified |
-------------------------------------------+--------------------------------
Comment(by wenzeslaus):
Replying to [comment:1 glynn]:
> No objections, although `opt = opt.strip('_')` would probably suffice.
GRASS option names will never start or end with an underscore.
I will strip just one at the begging or one at the end. I don't want
people to use `__lambda__` or something like this.
I even consider to write to doc that `_lambda` is obsolete (in 7.0) and in
next versions (7.1 or 7.5) I would include a warning. Finally, I would
remove (7.2 or 8.0) the condition completely. This would allow for GRASS
option names starting with underscore which might be used for some
internal purpose (although this is probably not a good idea).
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2441#comment:2>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list