[Zope-CMF] Re: [dev] Actions: lazy dict not working with DTML?
yuppie
y.2004_ at wcm-solutions.de
Thu Aug 5 10:29:12 EDT 2004
Dieter Maurer wrote:
> The code in "cDocumentTemplate.c:MM_cget" checks whether
> the object is a "dict" and in this case calls
> "PyDict_GetItem". This function ignores your "__getitem__" customization
> (and directy uses the dict's "__getitem__").
>
> You can replace "dict" above by
> "UserDict" (from module "UserDict") and the problem disappears
> (as then the "PyDict_Check" will return "false").
Thanks for the hint! I made a new checkin based on UserDict and
everything seems to work now.
BTW: UserDict is deprecated, but that should be a minor issue.
Cheers, Yuppie
More information about the Zope-CMF
mailing list