showing pydoc with VIM plugin

This commit is contained in:
David Halter
2012-09-05 10:07:51 +02:00
parent 1b1e18a9e5
commit 20b3c3c82b
4 changed files with 71 additions and 4 deletions

View File

@@ -121,6 +121,14 @@ class Definition(object):
d = d.get_code().replace('\n', '')
return d
@property
def doc(self):
try:
return str(self.definition.docstr)
except AttributeError:
return ''
def __str__(self):
if self.module_path[0] == os.path.sep:
position = '@%s' % (self.line_nr)