[Zope3-dev] LocationProxy refactoring

dev at projekt01.ch dev at projekt01.ch
Wed May 3 20:01:28 EDT 2006


Hi Jim,

The method _verify in zope.interface.verify
raises the exception for decorated LocationProxy methods 
at line 75.

else:
    if not callable(attr):
        raise BrokenMethodImplementation(name, "Not a method")
    # sigh, it's callable, but we don't know how to intrspect it, so
    # we have to give it a pass.
    continue

Is it possible to change it to:

else:
    if not (callable(attr) or type(property)):
        raise BrokenMethodImplementation(name, "Not a method")
    # sigh, it's callable, but we don't know how to intrspect it, so
    # we have to give it a pass.
    continue

which will allow to use the decorator "@non_overridable"
for methods on proxies like:

@non_overridable
def has_key(self, key):
    return getProxiedObject(self).has_key(key)


Regards
Roger Ineichen
_____________________________
Projekt01 GmbH
www.projekt01.ch
Boesch 65
6331 Hünenberg
phone     +41 (0)41 781 01 78
mobile    +41 (0)79 340 52 32
fax       +41 (0)41 781 00 78
email roger.ineichen at projekt01.ch
_____________________________
END OF MESSAGE



More information about the Zope3-dev mailing list