This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: printf-style formatting allows mixing keyed and keyless specifiers
Type: behavior Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: barry, eric.smith, jwilk
Priority: normal Keywords:

Created on 2014-10-10 10:09 by jwilk, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg228978 - (view) Author: Jakub Wilk (jwilk) Date: 2014-10-10 10:09
>>> '%(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.
msg228982 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2014-10-10 11:04
This is a duplicate of issue 1467929.
History
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66787
2014-10-10 13:07:34barrysetnosy: + barry
2014-10-10 11:04:14eric.smithsetstatus: open -> closed

nosy: + eric.smith
messages: + msg228982

resolution: duplicate
stage: resolved
2014-10-10 10:09:21jwilkcreate