[z3-five] SimpleViewClass and __hash__
Jean-Marc Orliaguet
jmo at chalmers.se
Mon May 9 12:03:10 CEST 2005
Florent Guillaume wrote:
>Tarek Ziadé wrote:
>
>
>>Hi,
>>
>>I've ran into some problems with CPSSkins under CPS3 and a Product using
>>Five.
>>
>>CPSSkins creates a persistent dictionnary wich keys are zope 2 methods
>>names (zpt, py, dtml, etc)
>>
>>It raises errors on pages templates created through Five because they do
>>not have a __hash__ method
>>for the dict to work properly.
>>
>>
>
>If the hash key is the script *name* then you shouldn't need a hash on
>instances. And I don't see why CPSSckins would use the object itself as
>a key into a dict. That's absurd.
>
>Florent
>
>
I think that the problem is not here, but in the way persistent mappings
are treated.
the stored object in that case is a simply a *string* that happens to
have the same name as a page template or a script, which is then
compared to the id of REQUEST['PUBLISHED'], so there are no page
templates involved.
the following line failed before the changes:
http://svn.nuxeo.org/trac/pub/changeset/21402
it seems weird that a persistent mapping should not be accessible with
mapping.get(key) and
mapping.has_key(key) also fails under Five.
/JM
More information about the z3-five
mailing list