Message293993
Take a look at the __missing__(key) method for the regular dict API to see if it meets your needs. It is in the ``d[key]`` section at https://docs.python.org/3/library/stdtypes.html#dict
>>> class UpperDict(dict):
def __missing__(self, key):
return key.upper()
>>> d = UpperDict()
>>> print(d['tom'])
TOM |
|
Date |
User |
Action |
Args |
2017-05-20 03:06:43 | rhettinger | set | recipients:
+ rhettinger, namtt |
2017-05-20 03:06:43 | rhettinger | set | messageid: <1495249603.0.0.362236099421.issue30408@psf.upfronthosting.co.za> |
2017-05-20 03:06:42 | rhettinger | link | issue30408 messages |
2017-05-20 03:06:42 | rhettinger | create | |
|