On 1/24/2011 4:51 PM, Alan wrote:
Why do function objects compare in this way to numbers? Thanks, Alan Isaacdef f(): return...f>5True
In 3.x
>>> def f(): pass
>>> f > 5
Traceback (most recent call last):
File "<pyshell#39>", line 1, in <module>
f > 5
TypeError: unorderable types: function() > int()
There is a historical explanation in many past posts and probably in the
FAQ.
-- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
