May i customize basic operator (such as 1==3)?

Casey Hawthorne caseyhHAMMER_TIME at istar.ca
Wed Feb 22 17:52:00 EST 2006


Cannot one subclass the builtin types?

I have heard, that one should always use objects when programming and
avoid the builtin types!

Then one is prepared to change objects at will and not rely on any
special properties of the builtin types!


Robert Kern <robert.kern at gmail.com> wrote:

>Casey Hawthorne wrote:
>> I believe you are asking for a side effect from the "==" operator.
>> 
>> Add print statements to the __eq__ method.
>
>The things is, he wants to make those modifications to builtin types, which he
>can't do.
--
Regards,
Casey



More information about the Python-list mailing list