Choosing a programming language as a competitive tool

Andrew Henshaw andrew_dot_henshaw_at_earthling_dot_net
Mon May 7 23:21:28 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:9d5q1m0785 at news2.newsguy.com...
..snip...
> Suppose for the sake of argument that you do not care at
> all about the order of items on your shopping lists.  Then,
> they're really sets.  When comparing two shopping lists to
> see if you've bought the same things on successive weeks,
> you would consider
>     eggs
>     milk
> as "equal" to
>     milk
>     eggs
>
> But lists in Python (and LISP) don't really work that way;
> an == test between ['eggs','milk'] and ['milk','eggs'] will
> not return a true value.  One can use lists (of any kind)
> as one way to _represent_ sets, but this takes work and
> often throws up side issues.
>
>
> Support your shopping lists ARE order-significant.  For
> example, you list items you desire in decreasing order
> of importance, and buy each item if available in strictly
> that order until you run out of money or have bought all
> available items.
>
...snip...

The shopping lists that my wife gives to me are ordered.  She orders them by
the item's location in the store - it makes the shopping much faster!  (Man,
I never thought I'd have to bring this up in any newsgroup.)






More information about the Python-list mailing list