How would you name this dictionary?

2024-01-21 Thread bagratte via Python-list
class NameMe(dict):
def __missing__(self, key):
return key

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How would you name this dictionary?

2024-01-21 Thread Cameron Simpson via Python-list

On 21Jan2024 23:39, bagra...@live.com  wrote:

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?

--
https://mail.python.org/mailman/listinfo/python-list