←back to thread

101 points _ZeD_ | 2 comments | | HN request time: 0.001s | source
Show context
nikisweeting ◴[] No.44539220[source]
I would donate $500 to the PSF tomorrow if they added this, the lack of it is daily pain
replies(3): >>44539245 #>>44540127 #>>44540364 #
1. IshKebab ◴[] No.44540127[source]
You shouldn't be using dicts for data that you know the name of anyway - use dataclasses or named tuples. Dicts are best for things with keys that are not known at compile time.
replies(1): >>44541834 #
2. IgorPartola ◴[] No.44541834[source]
Since when can you use data classes for kwargs? There are plenty of times when you should use a dict even if you know the keys.