lists v. tuples

castironpi at gmail.com castironpi at gmail.com
Tue Mar 18 21:27:02 EDT 2008


> >> >>> b in b
> >> False
>
> > That's actually interesting.
>
> Just for the avoidance of doubt, I didn't write the 'b in b' line:
> castironpi is replying to himself without attribution.
>
> P.S. I still don't see the relevance of any of castironpi's followup to my
> post, but since none it made any sense to me I guess it doesn't matter.

Well, it does show thought and it's an interesting anomaly.  It's
related to the OP too (no less so than the one before it than any
other to the one before it): 'Why?' is pretty open-ended.

D'Aprano pointed out an ambiguity in the 'in' operator, which sparked
an idea that contributes to some other threads.  I thought Booth and
Bossy, "homogeneous ... add+remove" pretty well summed it up.  That's
my mistake for showing excitement to one thread that was actually
mostly prepared by another.  I'm in A.I. if that helps any.

I am puzzled by the failure on 'a in a' for a=[a].  >>> a== [a] also
fails.  Can we assume/surmise/deduce/infer it's intentional?



More information about the Python-list mailing list