[Zope] Help using list within python method (Solved?)
Passin, Tom
tpassin@mitretek.org
Fri, 21 Mar 2003 16:31:09 -0500
[ Michael Long]
>=20
> I changed line 182 to read:
>=20
> if groups =3D=3D entry.Group:
>=20
> and it seems to work. I still don't understand why the "in" operator
> does not work as expected.
>=20
IDLE 0.8 -- press F1 for help
>>> gg =3D ['a','b']
>>> aa =3D 'this is a test'
>>> print aa in gg
0
>>> print gg in aa
Traceback (most recent call last):
File "<pyshell#3>", line 1, in ?
print gg in aa
TypeError: 'in <string>' requires character as left operand
>>>=20
You are mixing and matching data types in a way that does not work
Cheers,
Tom P