1
0
forked from VimPlug/jedi

cleanup / py2.5 and py2.6 compatibility

This commit is contained in:
David Halter
2012-12-18 00:56:16 +01:00
parent ffeecc1674
commit 92feb2f1d6

View File

@@ -212,8 +212,8 @@ class FastParser(use_metaclass(CachedFastParser)):
parts.pop(1) parts.pop(1)
#self.parsers[:] = [] #self.parsers[:] = []
hashes = {p.hash:p for p in self.parsers} # dict comprehensions are not available in py2.5/2.6 :-(
#print set(hashes) hashes = dict((p.hash, p) for p in self.parsers)
line_offset = 0 line_offset = 0
start = 0 start = 0
@@ -233,9 +233,7 @@ class FastParser(use_metaclass(CachedFastParser)):
if self.user_position is not None and \ if self.user_position is not None and \
m.start_pos <= self.user_position <= m.end_pos: m.start_pos <= self.user_position <= m.end_pos:
# It's important to take care of the whole user # It's important to take care of the whole user
# positioning stuff. # positioning stuff, if no reparsing is being done.
#print(h, line_offset, m.start_pos, lines)
#p = None
p.user_stmt = m.get_statement_for_position( p.user_stmt = m.get_statement_for_position(
self.user_position, include_imports=True) self.user_position, include_imports=True)
if p.user_stmt: if p.user_stmt: