[Types-sig] Re: Type equivalence
Marcin 'Qrczak' Kowalczyk
qrczak@knm.org.pl
Thu, 15 Mar 2001 16:15:35 +0100 (CET)
On Thu, 15 Mar 2001, Barry A. Warsaw wrote:
> The type/class that I've prototyped (in either a C or Python module)
> defined two objects `true' and `false' which mostly supported
> comparison semantics with current true and false objects in Python.
> E.g. true == 1, but true is not 1, and false == {} but false is not {}.
This is strange. Why not just have true and false as canonical truth
values, without magic in comparisons, and keeping old semantics of which
values are considered true?
The biggest problem is that letting == < etc. return false/true instead of
0/1 breaks compatibility a lot.
--
Marcin 'Qrczak' Kowalczyk