Steven D'Aprano wrote:
> Playing around with comparisons of functions (don't ask), I discovered an
> interesting bit of unintuitive behaviour:
> 
>>>>(lambda y: y) < (lambda y: y)
> False
> 
> Do the comparison again and things become even more bizarre:
> 
>>>>(lambda y: y) < (lambda y: y)
> True
> 
>>>>(lambda y: y) < (lambda y: y)
> False
> 
> This behaviour should be easy for experienced Pythonisters to answer, but
> will probably confuse beginners greatly.

Beginners should not be comparing lambdas.

Neither should you. ;-)

-Peter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to