[New-bugs-announce] [issue13610] On Python parsing numbers.

Jean-Michel Fauth report at bugs.python.org
Fri Dec 16 08:27:21 CET 2011


New submission from Jean-Michel Fauth <wxjmfauth at gmail.com>:

Can this be fixed? As far as I can remember (ver. 1.5.6),
it has always existed. Python does not crash, I find it
inelegant. Should it not be a SyntaxError?

Side effect. Searching for keywords, (eg. with re, "\b") may
practically always implies to handle this case separately.

Python all versions.

>>> 1and 0
0
>>> 1or 0
1
>>> 9if True else 22
9
>>> 0.1234if True else 22
0.1234
>>> [999for i in range(3)]
[999, 999, 999]

----------
components: Interpreter Core
messages: 149596
nosy: Jean-Michel.Fauth
priority: normal
severity: normal
status: open
title: On Python parsing numbers.
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13610>
_______________________________________


More information about the New-bugs-announce mailing list