Cameron Simpson <
[email protected]> writes:
I would need to know more about what it might be used for. What larger >problem led you to writing a `dict` subclass with this particular >`__missing__` implementation?
The Python Library Reference (Release 3.13.0a0) contains:
class Default(dict):
|... def __missing__(self, key):
|... return key
. Otherwise, I personally might think of:
class DefaultsToKey( dict ):
|... def __missing__( self, key ):
|... return key
.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)