python class that acts as mapping for **unpacking
问题 Without subclassing dict, what would a class need to be considered a mapping so that it can be passed to a method with ** from abc import ABCMeta class uobj: __metaclass__ = ABCMeta uobj.register(dict) def f(**k): return k o = uobj() f(**o) # outputs: f() argument after ** must be a mapping, not uobj At least to the point where it throws errors of missing functionality of mapping, so I can begin implementing. I reviewed emulating container types but simply defining magic methods has no effect