type(d) != type(d.copy()) when type(d).issubclass(dict)

kj no.email at please.post
Fri Dec 24 13:52:02 EST 2010




Watch this:

>>> class neodict(dict): pass
... 
>>> d = neodict()
>>> type(d)
<class '__main__.neodict'>
>>> type(d.copy())
<type 'dict'>


Bug?  Feature?  Genius beyond the grasp of schlubs like me? 

~kj




More information about the Python-list mailing list