[Tutor] comparing lists, __lt__ and __gt__
Sara Johnson
sarliz73 at yahoo.com
Sat Jul 28 22:17:08 CEST 2007
First off, Kent, thanks for posting that! I know it's in the Python library but it does help to have a bookmark for things I know I'll need pretty soon.
Second... What if there is a '<<' or '>>'? Does that just mean the same thing (maybe a little over emphasized.. ;) I thought I saw this when I was learning boolean expressions, but I don't recall.
----- Original Message ----
From: Kent Johnson kent37 at tds.net
Good question! The only doc I can find on this behavior is this:
http://docs.python.org/lib/comparisons.html
which just says that the comparison operation exists. There doesn't seem
to be any documentation on how comparison works with sequences.
I think it is pretty safe to count on the current behaviour of < and >
for lists. I'll put in a documentation bug on this - the meaning of
these operations (and ==) should be explicit in the docs.
Kent
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070728/a478c1ac/attachment.html
More information about the Tutor
mailing list