testing two lists for equality

Skip Montanaro skip at pobox.com
Fri Jun 20 15:22:46 CEST 2003


    Raymond> Do you think docs should be changed from:

    Raymond>      Tuples and lists are compared lexicographically using
    Raymond>      comparison of corresponding items.

    Raymond> To:
    Raymond>      ... compared by sequentially comparing corresponding
    Raymond>      items. 

    Raymond> Or something like:

    Raymond>      ...compared sequentially using comparison of corresponding
    Raymond>      items 

Based on the search I just did for "lexicography" ("The art, process, or
occupation of making a lexicon or dictionary; the principles which are
applied in making dictionaries."), I'd say just about anything would be more
correct than the current phrasing.  How about

    Sequences are compared element-by-element.  To compare equal each
    element must compare equal and the two sequences must be of the same
    type and have the same length.

Skip






More information about the Python-list mailing list