From 9650520f604a1583b4d9f352343c7c56a49736ee Mon Sep 17 00:00:00 2001 From: David Halter Date: Tue, 6 Nov 2012 19:13:00 +0100 Subject: [PATCH] raw_doc additionally, for #53 --- jedi/api.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/jedi/api.py b/jedi/api.py index 5311740a..ab2af7d0 100644 --- a/jedi/api.py +++ b/jedi/api.py @@ -83,6 +83,14 @@ class Completion(object): except AttributeError: return '' + @property + def raw_doc(self): + """ Returns the docstring `__doc__` for any object """ + try: + return str(self.name.parent().docstr) + except AttributeError : + return '' + @property def type(self): """ Returns the type of a completion object (e.g. Function/Class) """