Steven D'Aprano wrote:

>> So, if I do:
>>
>> f = SpecialFile.open(name, mode)
>>
>> I get infinite recursion.
>
> I see you are already using an open method. So let me see if I have this
> right: you have a function open, plus an open method? Why?

SpecialFile is a module.  please read the posts you reply to, and please cut out
the "holier than thou" design advice.

overriding builtins is perfectly okay, if it makes sense for the target 
application.

just remember to use __builtin__ (a module) instead of __builtins__ (a cpython
implementation hack) if you need to access the original builtins.

</F> 



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

Reply via email to