Terry J. Reedy added the comment:
After reading Eric's comments and checking the signature of .format and
rereading the Format String Syntax section, I have changed my mind. The
signature of .format is "S.format(*args, **kwargs) -> str" and args is a tuple.
So the user asks for creation of a tuple by calling .format. The only unusual
part is the the user also provides indexes into the args tuple, but the doc is
clear enough that ints passed as specification field names select positional
arguments. I think the current message is correct enough to leave alone in
current releases. An improved message might be
IndexError("Replacement index %d out of range for positional args tuple")
This uses 'replacement index' as a contraction of 'integer passed as
replacement field name'.
----------
type: behavior -> enhancement
versions: -Python 2.7, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21879>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com