diff options
Diffstat (limited to 'Modules/cgen.py')
-rw-r--r-- | Modules/cgen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/cgen.py b/Modules/cgen.py index 0cdeaa6..1e345d1 100644 --- a/Modules/cgen.py +++ b/Modules/cgen.py @@ -33,8 +33,8 @@ digits = '0123456789' # def getnum(s): n = '' - while s[:1] in digits: - n = n + s[:1] + while s and s[0] in digits: + n = n + s[0] s = s[1:] return n, s |