1
0
forked from VimPlug/jedi

introduce an is_scope function to make it easier to work with scopes

This commit is contained in:
Dave Halter
2014-06-20 17:47:42 +02:00
parent 3ee3a04bcb
commit ddca14980e
4 changed files with 12 additions and 4 deletions

View File

@@ -191,12 +191,18 @@ class Simple(Base):
return "<%s: %s@%s,%s>" % \
(type(self).__name__, code, self.start_pos[0], self.start_pos[1])
def is_scope(self):
return False
class IsScope(Base):
__slots__ = ()
def is_scope(self):
return True
class Scope(Simple, IsScope, DocstringMixin):
class Scope(IsScope, Simple, DocstringMixin):
"""
Super class for the parser tree, which represents the state of a python
text file.