In <xns9e59a27def178duncanbo...@127.0.0.1> Duncan Booth 
<duncan.bo...@invalid.invalid> writes:

>kj <no.em...@please.post> wrote:

>> 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? 

>Feature.

>In (almost?) all cases any objects constructed by a subclass of a builtin 
>class will be of the original builtin class.


What I *really* would like to know is: how do *you* know this (and
the same question goes for the other responders who see this behavior
of dict as par for the course).  Can you show me where it is in
the documentation?  I'd really appreciate it.  TIA!

~kj
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to