23 Mar
2007
23 Mar
'07
4:19 p.m.
On 3/23/07, Garito <garito@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