[issue44496] string.Formatter class not allowing {.field}

2021-06-23 Thread Aschwin
New submission from Aschwin : 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

[issue42191] lib.argparse._check_value() using repr instead of str

2020-10-29 Thread Aschwin
Change by Aschwin : -- title: lib.argparse._check_value() using repre instead of str -> lib.argparse._check_value() using repr instead of str ___ Python tracker <https://bugs.python.org/issu

[issue42191] lib.argparse._check_value() using repre instead of str

2020-10-29 Thread Aschwin
New submission from Aschwin : When using a custom type in add_argument(), the error message on an incorrect value uses repr instead of str, which looks ugly. Example code: login2account = { c.account.login: c.account for c in self.admin.get_accounts() } action_add_parser.add_argument