19 Feb
2021
19 Feb
'21
5:35 a.m.
If SimpleNamespace were to become a builtin, what should its name be?
Just to have the obvious out of the way: * obj() - fits with most other builtins in that they are abbreviations and 3-4 letters * data() - same, might be confused with dataclass * container() * values() Most of these are likely *widely used* as variables already, but at least they are descriptive. :) (As a related point, this could become really nice to use if we ever got an "auto" return type. Most of the time the return type *name* of a single-use function is largely important and annoying to have to define in a different place from its usage, but I'd still like to have it type checked. https://github.com/python/typing/issues/727) Ciao, Dan Strokirk