comparing str's with ints
Kragen Sitaker
kragen at pobox.com
Wed May 1 21:07:55 EDT 2002
"Andrew Dalke" <dalke at dalkescientific.com> writes:
> Kragen:
> >Thus, heterogeneous collections are sortable. This might be a wart;
> >once, > couldn't raise exceptions, and now we're stuck with its old
> >behavior in this case for compatibility. It's kind of nice that
> >heterogeneous collections are sortable, though.
>
> TypeError: cannot compare complex numbers using <, <=, >, >=
Thanks for the correction! I guess heterogeneous collections are no
longer sortable. I guess that means complex numbers were added after
== and > could raise exceptions.
More information about the Python-list
mailing list