[New-bugs-announce] [issue26276] Inconsistent behaviour of PEP 3101 formatting between versions

Mark Shannon report at bugs.python.org
Wed Feb 3 06:39:10 EST 2016


New submission from Mark Shannon:

In Python 2.7.6 and 3.2.3:
>>> "{ {{ 0} }}".format(**{' {{ 0} }': 'X'})
'X'

In Python 3.4.3:
>>> "{ {{ 0} }}".format(**{' {{ 0} }': 'X'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: unexpected '{' in field name


I think the problem is that PEP 3101 is under specified w.r.t. to non identifier characters in format units.

----------
components: Interpreter Core
messages: 259473
nosy: Mark Shannon
priority: normal
severity: normal
status: open
title: Inconsistent behaviour of PEP 3101 formatting between versions
type: behavior
versions: Python 3.4

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


More information about the New-bugs-announce mailing list