5 ms·
I'm guessing someone got inspired by https://adamj.eu/tech/2021/05/11/python-type-hints-args-and-kwargs/ https://adamj.eu/tech/2021/05/11/python-type-hints-args
by VectorLock 3y ago
I'm guessing someone got inspired by https://adamj.eu/tech/2021/05/11/python-type-hints-args-and-kwargs/ https://adamj.eu/tech/2021/05/11/python-type-hints-args-and-...
IMHO mixing args and kwargs together like this - having a dict with mixed types for keys - looks kinda grotty.
- acmiyaguchi 3y agoI agree, it changes the semantics of dictionaries in a way that doesn't feel right. There are several things that are off-putting, but another example in vein with the mixed key types is the implicit ordered dict.
- Spivak 3y agoEvery dict in Python is already ordered so it doesn't change much and Python doesn't blink at something like `int | str` so you can already do something like {0: "hello", "0": "world"} if you hated your readers. The only change would be changing how ** works when used as function arguments which is already bespoke.