1
0
forked from VimPlug/jedi

python 2.5 compatibility

This commit is contained in:
David Halter
2012-09-06 02:35:38 +02:00
parent 8ebb1fbbfe
commit 0008e2c703
3 changed files with 16 additions and 6 deletions
+7 -3
View File
@@ -7,8 +7,12 @@ import pydoc
try:
from pydoc_data import topics as pydoc_topics
except ImportError:
# Python 2.5/2.6
import pydoc_topics
# Python 2.6
try:
import pydoc_topics
except ImportError:
# Python 2.5
pydoc_topics = None
if is_py3k():
keys = keyword.kwlist
@@ -63,4 +67,4 @@ def imitate_pydoc(string):
except TypeError:
return ''
return pydoc_topics.topics[label]
return pydoc_topics.topics[label] if pydoc_topics else ''