returning True, False or None
Fredrik Lundh
fredrik at pythonware.com
Fri Feb 4 14:59:01 EST 2005
More information about the Python-list mailing list
Fri Feb 4 14:59:01 EST 2005
- Previous message (by thread): returning True, False or None
- Next message (by thread): returning True, False or None
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Steven Bethard wrote:
>> return max(lst)
>
> Very clever! Thanks!
too clever. boolean > None isn't guaranteed by the language specification:
http://docs.python.org/ref/comparisons.html
"... objects of different types always compare unequal, and are ordered consistently
but arbitrarily. /.../ In the future, the comparison rules for objects of different types are
likely to change. ..."
</F>
- Previous message (by thread): returning True, False or None
- Next message (by thread): returning True, False or None
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list