1
0
forked from VimPlug/jedi

don't encode strings in python3, affects davidhalter/jedi-vim#94 and @dbrgn

This commit is contained in:
David Halter
2013-02-23 21:10:22 +04:30
parent 6ea64a28bf
commit 4ee4e225a6

View File

@@ -92,7 +92,9 @@ class Simple(Base):
return scope
def __repr__(self):
code = self.get_code().replace('\n', ' ').encode(encoding, 'replace')
code = self.get_code().replace('\n', ' ')
if not is_py3k:
code = code.encode(encoding, 'replace')
return "<%s: %s@%s,%s>" % \
(type(self).__name__, code, self.start_pos[0], self.start_pos[1])