Paul Rubin <no.em...@nospam.invalid> writes:

> Ben Finney <ben+pyt...@benfinney.id.au> writes:
> > but, if there is no ‘set’ type, it's fine to write::
> >     sorted(foolist) == sorted(barlist)
>
> what about dictionaries?

Creating a needless dict for each list would make the code even less
clear, I'd think. (We're talking here about design, which is why clarity
of communicating semantic intent is a concern.)

Of course, the ‘set’ type is an even clearer way of communicating the
intent; so, the above doesn't need to work in Python 3, which can break
code written before the advent of the ‘set’ type.

-- 
 \       “But Marge, what if we chose the wrong religion? Each week we |
  `\          just make God madder and madder.” —Homer, _The Simpsons_ |
_o__)                                                                  |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to