[Zope] Get object by object id

Paul Winkler pw_lists@slinkp.com
Thu, 5 Sep 2002 15:15:38 -0700


On Thu, Sep 05, 2002 at 07:06:13PM -0300, Marco Catunda wrote:
> You can use dictonary syntax:
> 
> folder[id]

... but you must handle the error if the object doesn't
exist. You can also do:

folder.get(id)   # yields None if folder[id] doesn't exist



--

Paul Winkler
"Welcome to Muppet Labs, where the future is made - today!"