[docs] Python v2.7.2 documentation > The Python Tutorial > 5.1 More on Lists

Sandro Tosi sandro.tosi at gmail.com
Sat Feb 18 18:01:52 CET 2012


Hello Jim,
thanks for your report.

On Sun, Feb 12, 2012 at 04:44, Jim Kovacs <jim.kovacs at gmail.com> wrote:
> 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

i've opened http://bugs.python.org/issue14050 to fix it.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list