Hi all!

Please consider this code:

def __bobo_traverse__(self, REQUEST, name):
       obj = self.Propiedad(name)
       if obj is None: return self
       else: return obj

def Propiedad(self, propiedad):
   obj = getattr(self, propiedad, None)
   if obj is None: return obj # AƱadir busqueda al catalogo
if type(obj) == type(str('')) and obj.startswith('[') and obj.endswith(']'):
           return self.Expresion({'Expresion': obj[1:-1]})['Resultado']
   return obj

I wonder why I can do:

<tal:b tal:replace='python: here.Propiedad("Modificacion")' />

but not:

<tal:b tal:replace='here/Modificacion' />

Where Modificacion is a property that starts with '[' and ends with ']'
and Expresion is a member who evaluates the expresion as a TAL expresion and put the result in a dictionary with the key 'Resultado'

When I try here/Modificacion an unauthorized error trying to access Modificacion

Can you explain me what is happening, please?


Mis Cosas

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