[issue22597] printf-style formatting allows mixing keyed and keyless specifiers
Jakub Wilk
report at bugs.python.org
Fri Oct 10 12:09:21 CEST 2014
New submission from Jakub Wilk:
>>> '%(eggs)s %s' % {'eggs': 'ham'}
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not enough arguments for format string
>>> '%s %(eggs)s' % {'eggs': 'ham'}
"{'eggs': 'ham'} ham"
I would expect a raised exception also in the latter case.
----------
components: Library (Lib)
messages: 228978
nosy: jwilk
priority: normal
severity: normal
status: open
title: printf-style formatting allows mixing keyed and keyless specifiers
type: behavior
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22597>
_______________________________________
More information about the Python-bugs-list
mailing list