PEP 285: Adding a bool type
Christian Tanzer
tanzer at swing.co.at
Tue Apr 2 12:11:22 EST 2002
martin at v.loewis.de (Martin v. Loewis) wrote:
> > 'if x == y:' should cause no warning, of course -- it's a general, perfectly
> > good polymorphic usage. Why should the user have to silence warnings
> > or break the smoothness of polymorphism to ensure against x, or y, or
> > both being of this newfangled bool type?
>
> Indeed. I wonder how often the warning would trigger, though. I'd
> expect that people very rarely compare the result the got from a
> predicate to something else.
Except if one wants to compare the results of two or more predicates.
I'd expect such comparions to be not that rare -- I know that I
sometimes use such.
And Alex was talking about polymorphic usage -- by definition, you
can't know what types are compared there.
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list