Convert octal constants for Python compatibility

This commit is contained in:
Andrew D. Wong 2014-01-29 02:20:07 -05:00
parent 0095241a6f
commit e5f636af2f
1 changed files with 1 additions and 1 deletions

View File

@ -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)