[docs] Python v2.7.2 documentation > The Python Tutorial > 5.1 More on Lists
Jim Kovacs
jim.kovacs at gmail.com
Sun Feb 12 04:44:08 CET 2012
Regarding the Python v2.7.2 documentation > The Python Tutorial > 5.1
More on Lists (
http://docs.python.org/tutorial/datastructures.html#more-on-lists ),
for list.sort() consider briefly mentioning that an "ordering
relation" must be defined.
E.g. this results in an error:
a = ['abc', 3.14159, complex(1,-1), 123]
print a.sort()
print a.sort()
TypeError: no ordering relation is defined for complex numbers
More information about the docs
mailing list