why are functions greater than numbers?

Ian Kelly ian.g.kelly at gmail.com
Mon Jan 24 17:39:40 EST 2011


On Mon, Jan 24, 2011 at 2:51 PM, Alan <alan.isaac at gmail.com> wrote:
> Why do function objects compare in this way to numbers?
> Thanks,
> Alan Isaac
>
>
>>>> def f(): return
> ...
>>>> f>5
> True

http://docs.python.org/library/stdtypes.html#comparisons

Python 3 fixes this particular wart.



More information about the Python-list mailing list