#3804: Naming conventions for imports in GRASS codebase
--------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Python | Version: svn-trunk
Resolution: | Keywords:
CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Comment (by sbl):
Sounds very reasonable to me and should also apply to addons.
That might make it a bit easier for new addon-devs.
A way to import, that can be applied at all levels while avoiding
potential conflicts with other libraries would be to add a g before the
names of the imported components, as it has been practice in many cases:
import grass.script as gscript\\
import grass.script.core as gcore\\
import grass.pygrass.utils as gutils
A respective guideline should be added to:
https://trac.osgeo.org/grass/wiki/Submitting/Python
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3804#comment:1>
GRASS GIS <https://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev