class NameMe(dict):
def __missing__(self, key):
return key
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?
|... def __missing__(self, key):class Default(dict):
|... def __missing__( self, key ):class DefaultsToKey( dict ):
Sysop: | Tetrazocine |
---|---|
Location: | Melbourne, VIC, Australia |
Users: | 6 |
Nodes: | 8 (0 / 8) |
Uptime: | 44:45:27 |
Calls: | 45 |
Files: | 21,492 |
Messages: | 63,459 |