Message396383
I expected the custom Formatter to behave the same as the normal "".format() function, but unnamed args or not supported.
Below is an example, which fails at a KeyError.
from string import Formatter
class test():
def __init__(self):
self.msg = "OK"
t = test()
print("Normal format() is {.msg}".format(t))
f = Formatter()
print(f.format("Formatter.format() is {.msg}", t)) |
|
Date |
User |
Action |
Args |
2021-06-23 07:26:04 | avdwoude | set | recipients:
+ avdwoude |
2021-06-23 07:26:04 | avdwoude | set | messageid: <1624433164.24.0.876705812645.issue44496@roundup.psfhosted.org> |
2021-06-23 07:26:04 | avdwoude | link | issue44496 messages |
2021-06-23 07:26:04 | avdwoude | create | |
|