Message222545
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'. |
|
Date |
User |
Action |
Args |
2014-07-08 05:15:02 | terry.reedy | set | recipients:
+ terry.reedy, roysmith, eric.smith, ezio.melotti, tshepang |
2014-07-08 05:15:02 | terry.reedy | set | messageid: <1404796502.33.0.967919246764.issue21879@psf.upfronthosting.co.za> |
2014-07-08 05:15:02 | terry.reedy | link | issue21879 messages |
2014-07-08 05:15:01 | terry.reedy | create | |
|