Steven D'Aprano wrote:
Why do you want something that isn't a mapping to be usable with mapping unpacking?
I think mapping is not `abc.Mapping` class only. What about: `Iterator[Tuple[str, int]]` ``` @dataclass class MyMap: x: int y: int ``` Is this "mapping"? In Python I can use `/` as path separator: `pathlib.Path.cwd() / 'my_dir'`. I can control the behavior of my class. But I only have one way to unpack the object. Not a perfect way. `dict.update ()` gives more freedom. Steven D'Aprano wrote:
Does it really hurt you to provide mapping methods when you get them for free? Just inherit from Mapping.
``` # first.py: @dataclass class Point2D(Mapping): # second.py @dataclass class Point3D(Point2D): ``` Now I have to think about unnecessary public methods.