Merge pull request #130 from andrewwong1221/python3-octal-fix
Fixing Python3 Octal Constant Compatibility Issue
This commit is contained in:
commit
7bc3ee4c1a
@ -17,7 +17,7 @@ def vim_encode(data):
|
||||
elif isinstance(data, str):
|
||||
str_list = []
|
||||
for c in data:
|
||||
if (000 <= ord(c) and ord(c) <= 037) or c == '"' or c == "\\":
|
||||
if (0 <= ord(c) and ord(c) <= 31) or c == '"' or c == "\\":
|
||||
str_list.append("\\%03o" % ord(c))
|
||||
else:
|
||||
str_list.append(c)
|
||||
|
Loading…
Reference in New Issue
Block a user