[issue13688] ast.literal_eval fails on octal numbers

2011-12-31 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution: rejected -> invalid

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13688] ast.literal_eval fails on octal numbers

2011-12-31 Thread Sergey Dorofeev

Sergey Dorofeev  added the comment:

python 3 feature - should use 0o10
need to rebuild data file :(

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13688] ast.literal_eval fails on octal numbers

2011-12-31 Thread Sergey Dorofeev

New submission from Sergey Dorofeev :

Python 3.2.2 (default, Nov 16 2011, 10:58:44) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.literal_eval('10')
10
>>> ast.literal_eval('0x10')
16
>>> ast.literal_eval('010')
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/python322/lib/python3.2/ast.py", line 48, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
  File "/opt/python322/lib/python3.2/ast.py", line 36, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
  File "", line 1
010
  ^
SyntaxError: invalid token

--
components: Library (Lib)
messages: 150414
nosy: fidoman
priority: normal
severity: normal
status: open
title: ast.literal_eval fails on octal numbers
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com