]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Insert a safety space after numbers as well as names in untokenize().
authorGuido van Rossum <guido@python.org>
Thu, 30 Mar 2006 21:43:35 +0000 (21:43 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 30 Mar 2006 21:43:35 +0000 (21:43 +0000)
Lib/tokenize.py

index 2b40e6f31bb499f3761059c891ac3d42b1ae03a1..a30791c2cdd7b24d33d206c5ebfb25946e629f73 100644 (file)
@@ -182,7 +182,7 @@ def untokenize(iterable):
     for tok in iterable:
         toknum, tokval = tok[:2]
 
-        if toknum == NAME:
+        if toknum in (NAME, NUMBER):
             tokval += ' '
 
         if toknum == INDENT: