فهرست منبع

Make the repr of the class consistent with the attributes name

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58033 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 11 سال پیش
والد
کامیت
f930002dcc
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      lib/python/pygrass/gis/region.py

+ 3 - 3
lib/python/pygrass/gis/region.py

@@ -193,9 +193,9 @@ class Region(object):
 
     #----------MAGIC METHODS----------
     def __repr__(self):
-        return 'Region(n=%g, s=%g, e=%g, w=%g, nsres=%g, ewres=%g)' % (
-               self.north, self.south, self.east, self.west,
-               self.nsres, self.ewres)
+        rg = 'Region(north=%g, south=%g, east=%g, west=%g, nsres=%g, ewres=%g)'
+        return rg % (self.north, self.south, self.east, self.west,
+                     self.nsres, self.ewres)
 
     def _repr_html_(self):
         return dict2html(dict(self.items()), keys=self.keys(),