Mailing List Archive

[issue1013] eval error
New submission from Ray Ward:

>>> eval("9")
9
Works but.
>>> eval("09")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1
09
^
SyntaxError: invalid token

----------
messages: 55272
nosy: Rayfward
severity: normal
status: open
title: eval error
type: behavior
versions: Python 2.5

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue1013>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1013] eval error [ In reply to ]
New submission from Ray Ward:

>>> eval("9")
9
Works but.
>>> eval("09")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1
09
^
SyntaxError: invalid token

----------
messages: 55272
nosy: Rayfward
severity: normal
status: open
title: eval error
type: behavior
versions: Python 2.5

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue1013>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue1013] eval error [ In reply to ]
Georg Brandl added the comment:

This is not a bug. Integers beginning with "0" are octal literals in Python 2.x,
and "9" is not a valid octal digit.

Closing as Invalid.

----------
nosy: +georg.brandl
resolution: -> invalid
status: open -> closed

__________________________________
Tracker <report@bugs.python.org>
<http://bugs.python.org/issue1013>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com