PEP 335: Overloadable Boolean Operators - Official Posting

John Roth newsgroups at jhrothjr.com
Sat Sep 11 14:57:04 EDT 2004


"Colin J. Williams" <cjw at sympatico.ca> wrote in message 
news:4142EBC7.40105 at sympatico.ca...
>
>
> Gerrit wrote:
>> Colin J. Williams wrote:
>>
>>>I understand that the intent, eventually, is that the basic types become 
>>>classes.
>>>
>>>Would making Bool a class permit the achievement of these objectives?
>>>
...
>
> I misled with my comment about reprsentation.
>
> The basic suggestion I was trying to make is that, with a subclass,
> the expression 'A and B' could return almost whatever one wishes.

Unfortunately, it can't. A subclass needs a magic method to hook
into, without that it's got no leverage whatsoever.

John Roth
>
> Colin W.
>>
>> regards,
>> Gerrit.
>> 





More information about the Python-list mailing list