alternating the builtin functions

Carlo v. Dango oest at soetu.eu
Sun Oct 19 11:24:07 EDT 2003


On Sun, 19 Oct 2003 10:31:26 -0400, Jp Calderone <exarkun at intarweb.us> 
wrote:
>>
>> File "foo.py", line xxx, in isinstance
>>     if __builtins__.isinstance(object, classtype):
>> AttributeError: 'dict' object has no attribute 'isinstance'
>> What am I doing wrong here?
>>
>   Trying to put something in __builtins__.

what do you mean?

>
>   Doing this just creates behavior which is surprising to people who read
> your program.  Just define your version in one of your modules and leave 
> it
> there.  When you need it, import it.

sure, but my version relies on the original one, so I need a way to call 
the original isinstance() from within my isinstance()...


-carlo -- olrac

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/




More information about the Python-list mailing list