[GRASS-SVN] r54557 - grass/trunk/lib/python/pygrass/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 6 23:42:06 PST 2013


Author: zarch
Date: 2013-01-06 23:42:06 -0800 (Sun, 06 Jan 2013)
New Revision: 54557

Modified:
   grass/trunk/lib/python/pygrass/modules/__init__.py
Log:
Add __repr__ method to the Module object

Modified: grass/trunk/lib/python/pygrass/modules/__init__.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/__init__.py	2013-01-07 07:41:56 UTC (rev 54556)
+++ grass/trunk/lib/python/pygrass/modules/__init__.py	2013-01-07 07:42:06 UTC (rev 54557)
@@ -559,6 +559,9 @@
     def __str__(self):
         return ' '.join(self.make_cmd())
 
+    def __repr__(self):
+        return "Module(%r)" % self.name
+
     @property
     def __doc__(self):
         """{cmd_name}({cmd_params})



More information about the grass-commit mailing list