Comparison of functions
Georg Neis
gn at oglaroon.de
Sat Jul 30 10:14:14 EDT 2005
* Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> wrote:
> Steven D'Aprano wrote:
>>>>> 1+0j == 1 > 0
>> True
>
> (1+0j == 1) yields True, which is comparable to 0.
"a == b > c" is equivalent to "a == b and b > c":
>>> 1 == 1+0j > 0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: cannot compare complex numbers using <, <=, >, >=
More information about the Python-list
mailing list