1
0
forked from VimPlug/jedi

Define Name.docstr as a proxy for Statement.docstr

This commit is contained in:
Takafumi Arakaki
2013-02-24 19:32:19 +01:00
parent 740f27c8b8
commit b6839fb264

View File

@@ -1271,6 +1271,11 @@ class Name(Simple):
""" Returns the names in a full string format """
return ".".join(self.names)
@property
def docstr(self):
"""Return attribute docstring (PEP 257) if exists."""
return self.parent.docstr
def __str__(self):
return self.get_code()