> Looks like it can simply be done in Python, no tp_as_mapping needed.

It's not that it isn't needed. You've just shown a way to add it using
Python code.

But, more to the point: extending collections.abc.Mapping may or may
not be possible in OP's case.

Also, if you are doing this through inheritance, this seems really
convoluted: why not just inherit from dict? -- less methods to
implement, less stuff to import etc.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to