[Tutor] line class
Alan Gauld
alan.gauld at btinternet.com
Wed Jul 9 20:17:26 CEST 2008
"Kent Johnson" <kent37 at tds.net> wrote
> That just raises the question of how do complex numbers compare?
Usually based on magnitude alone.
That's why I said the results would be equivalent to the length of
a point approach. You assume that any point on the same sperical
locus is equal. At least on my engineering course :-)
I confess I haven't tried it to see if Python implements cmp for
the complex type.
>>> c < d
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: no ordering relation is defined for complex numbers
>>>
Apparently not! :-/
Alan G
More information about the Tutor
mailing list