Alec Munro wrote:

I have a content component that has a property that is a dictionary,
the keys of which are objects (content components themselves). The
values are lists of strings. I've tried implementing this a couple
different ways, but each time I restart, the dictionary comes up
empty.
I've tried initializing the dictionary as a standard dictionary, a
peristent dictionary, and as a field property. The results are the
same in any case.
Is there a problem with using objects as dictionary keys in this circumstance?

What I am trying to do is provide additional information relevant to
an object (the keys) specific to a given location (the original
content component). If there is another simple way to do this, I would
appreciate hearing it.

IMO, regularly immutable objects are used as keys. -> reason for intid-utility.
You could use the inids (zope.app.intid utility) to associate those objects.

(The zope.app.observable package could be another interesting approach for instance specific subscriptions.)

Regards,
Dominik
begin:vcard
fn:Dominik Huber
n:Huber;Dominik
email;internet:[EMAIL PROTECTED]
tel;work:++41 56 534 77 30
x-mozilla-html:FALSE
version:2.1
end:vcard

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to