aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2fcbe6430f2..961aebeeecd 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3546,7 +3546,11 @@ See `python-check-command' for the default."
3546 "def __PYDOC_get_help(obj): 3546 "def __PYDOC_get_help(obj):
3547 try: 3547 try:
3548 import inspect 3548 import inspect
3549 if hasattr(obj, 'startswith'): 3549 try:
3550 str_type = basestring
3551 except NameError:
3552 str_type = str
3553 if isinstance(obj, str_type):
3550 obj = eval(obj, globals()) 3554 obj = eval(obj, globals())
3551 doc = inspect.getdoc(obj) 3555 doc = inspect.getdoc(obj)
3552 if not doc and callable(obj): 3556 if not doc and callable(obj):
@@ -3569,10 +3573,7 @@ See `python-check-command' for the default."
3569 doc = doc.splitlines()[0] 3573 doc = doc.splitlines()[0]
3570 except: 3574 except:
3571 doc = '' 3575 doc = ''
3572 try: 3576 print (doc)"
3573 exec('print doc')
3574 except SyntaxError:
3575 print(doc)"
3576 "Python code to setup documentation retrieval." 3577 "Python code to setup documentation retrieval."
3577 :type 'string 3578 :type 'string
3578 :group 'python) 3579 :group 'python)