Semantics of ==

Andrew Bennetts andrew-pythonlist at puzzling.org
Mon Mar 29 08:09:57 EST 2004


On Mon, Mar 29, 2004 at 04:26:34AM -0800, Axel Boldt wrote:
> Erik Max Francis <max at alcyone.com> wrote
> > Axel Boldt wrote:
> > > Erik Max Francis <max at alcyone.com> wrote
> > > 
> > > > What part of the semantics are you unclear about?  Two sequences are
> > > > equal if they are element-wise equal.
> > > 
> > > That definition is circular.
> > 
> > No, because presumably you already understand what equality means for
> > two non-sequence objects.
> 
> Yes, but a list can contain other lists, and even itself, as elements.
> So in order to understand what equality for lists means, according to
> the above definition, you already need to understand what equality for
> lists means. That's what makes the definition circular. I thought we
> had clarified that much a week ago.

No, it makes the definition recursive.  There's a difference.

-Andrew.





More information about the Python-list mailing list