1
0
forked from VimPlug/jedi

Fix issues with octals in Python 2 (and possibly 3). Fixes #559.

This commit is contained in:
Dave Halter
2016-07-17 22:36:26 +02:00
parent 68ff520cf8
commit 2563746810
3 changed files with 25 additions and 1 deletions
+4 -1
View File
@@ -52,7 +52,10 @@ name = r'\w+'
hex_number = r'0[xX][0-9a-fA-F]+'
bin_number = r'0[bB][01]+'
oct_number = r'0[oO][0-7]+'
if is_py3:
oct_number = r'0[oO][0-7]+'
else:
oct_number = '0[0-7]+'
dec_number = r'(?:0+|[1-9][0-9]*)'
int_number = group(hex_number, bin_number, oct_number, dec_number)
exponent = r'[eE][-+]?[0-9]+'