[Zope] object manager - getOb(...) - parameter '_marker'

friedrich steindl zope at floSoft.net
Tue Dec 7 06:47:06 EST 2004


hi,

can somebody give me a hint what the parameter '_marker' is meant for in this 
code of the zope object manager -

    def _getOb(self, id, default=_marker):
        # FIXME: what we really need to do here is ensure that only
        # sub-items are returned. That could have a measurable hit
        # on performance as things are currently implemented, so for
        # the moment we just make sure not to expose private attrs.
        if id[:1] != '_' and hasattr(aq_base(self), id):
            return getattr(self, id)
        if default is _marker:
            raise AttributeError, id
        return default


_marker ist declared as an empty list at the beginning of the module, but 
outside of the object manager class

... and as i believe has something to do with the path to (container of) the 
object ???


thx for any hints

steindl friedrich
       (-:fs)




More information about the Zope mailing list