[Python-Dev] python 3 niggle: None < 1 raises TypeError
Serhiy Storchaka
storchaka at gmail.com
Mon Feb 17 13:19:49 CET 2014
17.02.14 13:56, M.-A. Lemburg написав(ла):
> Yes, but that's not the point. Unlike strings or other mixed types that
> you cannot compare, None is used as placeholder in data processing as
> special value to mean "no value available".
Isn't float('nan') such placeholder?
> You intentionally use such values in programming. It's not a bug to
> have None in a data list or as value of a variable.
You can't have None in array('f'), you can't add or multiply by None.
Relation operators don't looks an exception here. Applying sorted() to a
list which contains numbers and Nones makes as much sense as applying
sum() to it.
More information about the Python-Dev
mailing list