Comment by yde_java
1 day ago
I use the Python package 'sorcery' [0] in all my production services.
It gives dict unpacking but also a shorthand dict creation like this:
from sorcery import dict_of, unpack_keys
a, b = unpack_keys({'a': 1, 'b': 42})
assert a == 1
assert b == 42
assert dict_of(a, b) == {'a': 1, 'b': 42}
That seems a bit crazy and like it would lead to unpredictable and hard-to-mantain code. (pardon my candor).
im curios why you think so ?