[GRASS-dev] [GRASS GIS] #2441: Underscore to avoid Python keywords used improperly in grass.script
GRASS GIS
trac at osgeo.org
Sun Oct 5 22:45:52 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 zarch):
Replying to [comment:2 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.
+1
> 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).
Why not include the warning already in grass 7.0 and then clean the code
directly in grass 7.1?
Consider our long release time 7.2 means 6/8 years from now... and it seem
too long to me. :-)
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2441#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list