Author rhettinger
Recipients namtt, rhettinger
Date 2017-05-20.03:06:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495249603.0.0.362236099421.issue30408@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2017-05-20 03:06:43rhettingersetrecipients: + rhettinger, namtt
2017-05-20 03:06:43rhettingersetmessageid: <1495249603.0.0.362236099421.issue30408@psf.upfronthosting.co.za>
2017-05-20 03:06:42rhettingerlinkissue30408 messages
2017-05-20 03:06:42rhettingercreate