[Zope] context.user at ImplPython.py
Martijn Pieters
mj at zopatista.com
Fri Mar 23 12:19:58 EDT 2007
On 3/23/07, Garito <garito at sistes.net> 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
More information about the Zope
mailing list