Semantics of ==
Erik Max Francis
max at alcyone.com
Thu Mar 25 23:27:32 CET 2004
Axel Boldt wrote:
> Like I said, it would clarify the semantics of == for lists. Another
> use would be to hash on values of lists.
What part of the semantics are you unclear about? Two sequences are
equal if they are element-wise equal. That is the definition that
people rely on, that's the definition that the interpreter uses, and
that definition is even consistent with the behavior you saw with the
self-referencing lists which for some reason surprised you.
__ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ Whoever named it necking was a poor judge of anatomy.
-- Groucho Marx
More information about the Python-list