Alec Munro wrote:
IMO, regularly immutable objects are used as keys. -> reason for
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
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.
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.)
tel;work:++41 56 534 77 30
Zope3-users mailing list