[Grok-dev] Re: Referencing objects by id
lijssies at gp-net.nl
Tue Aug 5 04:38:06 EDT 2008
I found some interesting code snippets on the zope faq. In my previous I email was looking more for a semantical answer on naming objects.
Martijn Faassen wrote:
> One thing you should realize is that in Zope 3 (and therefore Grok) what
> is called 'id' in Zope 2 is actually called __name__. We call these the
> name in the container.
> So if you do:
> container[my_id] = s = Something()
> you can later retrieve the __name__ of the object in that container like
> I hope that helps!
> It might also be worthwhile to investigate the NameChooser story in Zope
> 3, though that isn't strictly necessary.
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev