Message405610
It appears when adding auto-numbered positional fields in python 3.1 `Formatter.parse` was not updated to handle them and currently returns an empty string as the field name.
```
list(Formatter().parse('hello {}')) # [('hello ', '', '', None)]
```
This does not align with `Formatter.get_field` which according to the docs: "Given field_name as returned by parse() (see above), convert it to an object to be formatted."
When supplying an empty string to `.get_field()` you get a KeyError
```
Formatter().get_field("", [1, 2, 3], {}). # raises KeyError
``` |
|
Date |
User |
Action |
Args |
2021-11-03 11:55:47 | SDesch | set | recipients:
+ SDesch |
2021-11-03 11:55:47 | SDesch | set | messageid: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> |
2021-11-03 11:55:47 | SDesch | link | issue45704 messages |
2021-11-03 11:55:47 | SDesch | create | |
|