[Zope] Strange ZCatalog behaviour
Dieter Maurer
dieter@handshake.de
Tue, 20 Mar 2001 21:38:24 +0100 (CET)
Ingo Wilmer writes:
> I experience Problems using ZCatalog,
> See following example:
> <dtml-in "Catalog(meta_type=3D'ZClass_seite_press',region=3Dzregion)">
> where zregion is one string and region is a list indexd as text
If "region" is a text index, the corresponding (indexed) value should
be a string. I do not know (doubt it) that ZCatalog can index
lists in a text index.
> when i change this to =20
> <dtml-in "Catalog(meta_type=3D'ZClass_seite_press',region in zregion)">
> where zregion itself is a list, containing 3 or more strings that=20
> should match on some instances of ZClass_seite_presse i can't
> even get this into zope, because i recive this error
>
> non-keyword arg after keyword arg
That is clear:
"in" is a Python operator.
"region in zregion" evaluates to either 0 or 1.
Thus, you call:
"Catalog(meta_type='ZClass_seite_press',1)"
Not what you want... And Python does it neither...
Dieter