[Zope] objectmanager contains object test

Ben Avery ben@thesite.org
Wed, 18 Dec 2002 16:52:35 +0000


this is probably really simple, but I can't figure it out from the API docs.

I want to test to see if a folder contains a dtml method with a known 
id. how do I do this from python?

I've tried
if context.data.news[ object_id ]
which breaks with a key error, if it doesn't exist.

I want something like context.data.news.has_key( object_id )
but object manager doesn't seem to have any methods like that.

and doing a try, and catching key errors seems a messy way to do it.