[GRASS-SVN] r54261 - grass/trunk/lib/python/pygrass

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 10 02:26:41 PST 2012


Author: zarch
Date: 2012-12-10 02:26:41 -0800 (Mon, 10 Dec 2012)
New Revision: 54261

Modified:
   grass/trunk/lib/python/pygrass/functions.py
Log:
Change parameter order in looking function

Modified: grass/trunk/lib/python/pygrass/functions.py
===================================================================
--- grass/trunk/lib/python/pygrass/functions.py	2012-12-10 10:25:26 UTC (rev 54260)
+++ grass/trunk/lib/python/pygrass/functions.py	2012-12-10 10:26:41 UTC (rev 54261)
@@ -15,15 +15,15 @@
 from pygrass.region import Region
 
 
-def looking(filter_string, obj):
+def looking(obj, filter_string):
     """
     >>> import grass.lib.vector as libvect
-    >>> sorted(looking('*by_box*', libvect))  # doctest: +NORMALIZE_WHITESPACE
+    >>> sorted(looking(libvect, '*by_box*'))  # doctest: +NORMALIZE_WHITESPACE
     ['Vect_select_areas_by_box', 'Vect_select_isles_by_box',
      'Vect_select_lines_by_box', 'Vect_select_nodes_by_box']
 
     """
-    word_list = [i for i in dir(obj)]
+    word_list = dir(obj)
     word_list.sort()
     return fnmatch.filter(word_list, filter_string)
 



More information about the grass-commit mailing list