why are functions greater than numbers?

Emile van Sebille emile at fenx.com
Mon Jan 24 18:17:47 EST 2011


On 1/24/2011 1:51 PM Alan said...
> Why do function objects compare in this way to numbers?

To provide ordering capabilities.  IIRC, comparisons of differing types 
are arbitrary but consistent.


Emile

> Thanks,
> Alan Isaac
>
>
>>>> def f(): return
> ...
>>>> f>5
> True
>





More information about the Python-list mailing list