On 3/23/07, Garito <[EMAIL PROTECTED]> wrote:
I don't know if I understand what you say
This is the code of one of my wrappers (str one):

class WrapperStr(str):
    """ """
    __roles__ = None

    def __bobo_traverse__(self, REQUEST, nombre):
        obj = getattr(self, nombre, None)
        if obj is None: return self
        else: return obj

What kind of object is obj? It should probably be acquisition wrapped
(return obj.__of__(self).

How could be the __call__? like:

def __call__(self):
  return <what to return here?>

The object returned from __bobo_traverse__ will be called by the
publisher, so *it* needs to implement __call__, but index_html and
__str__ may also do.

Martijn Pieters
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to