3 ms·
They don't work in the way you would think for dataclasses or at all for dicts/TypedDicts. See this for dataclasses: https://github.com/python/mypy/issues/5374
by oivey 4y ago
They don't work in the way you would think for dataclasses or at all for dicts/TypedDicts.
See this for dataclasses: https://github.com/python/mypy/issues/5374#issuecomment-884176911 https://github.com/python/mypy/issues/5374#issuecomment-8841....
- BerislavLopac 4y agoThis is a ridiculous example, because dataclasses and protocols are orthogonal: dataclasses (help) define data structures, while protocols define behaviour.