Comparison of functions
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Sat Jul 30 13:07:41 EDT 2005
Georg Neis wrote:
> * 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":
Right. Stupid me :) Doesn't do much to the point, though.
>>>> 1 == 1+0j > 0
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: cannot compare complex numbers using <, <=, >, >=
Reinhold
More information about the Python-list
mailing list