Ali Gholami Rudi  committed f219373

documenting astutils.get_name_levels

  • Participants
  • Parent commits 3690dff
  • Branches trunk

Comments (0)

Files changed (4)

File rope/base/

 def get_name_levels(node):
+    """Return a list of ``(name, level)`` tuples for assigned names
+    The `level` is `None` for simple assignments and is a list of
+    numbers for tuple assignments for example in::
+      a, (b, c) = x
+    The levels for for `a` is ``[0]``, for `b` is ``[1, 0]`` and for
+    `c` is ``[1, 1]``.
+    """
     visitor = _NodeNameCollector()
     ast.walk(node, visitor)
     return visitor.names

File rope/base/

 import rope.base.exceptions
 import rope.base.pynames
-import rope.base.pyobjects
 from rope.base import pyobjects, evaluate

File rope/base/

 class UnboundName(PyName):
     def __init__(self, pyobject=None):
         self.pyobject = pyobject
         if self.pyobject is None:

File rope/base/

+import rope.base.builtins
+import rope.base.codeanalyze
 import rope.base.pynames
 from rope.base import ast, exceptions