'in' operator

Jeff Epler jepler at inetnebr.com
Sat Feb 17 17:35:28 CET 2001


On Sat, 17 Feb 2001 11:21:05 +0200, Pearu Peterson
 <pearu at cens.ioc.ee> wrote:
>Me too, and because of the analogy:
>`an empty set is a subset of every set'
>`an empty string is a substring of every string'

But "in" doesn't test for a subset.  For instance,
	[1, 2] in [1, 2, 3, 4]
is 0.

However, I think that
	"" in "yY"
and
	0 in "yY"
should return 0, because for all items in "yY", none of them are
"" or 0.  (This is compared to raising an error)

Jeff



More information about the Python-list mailing list