[Zope] Monkey Patching Grief with Zope 2.9.4

Stefan H. Holek stefan at epy.co.at
Tue Sep 26 12:28:43 EDT 2006


Since Zope 2.8 you can no longer borrow methods from other classes  
like this. You have to borrow the function implementation.

SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed.im_func

Stefan


On 26. Sep 2006, at 16:33, Mark Wilson wrote:

> # now the monkey patching - ooh ooh eeeek ooh
>
>                     # save original method for use by superuser
>                     #    (see PF2SpecialUser.PF2SpecialUser_allowed)
>     PF2SpecialUser.PF2Superuser_allowed = SpecialUser.allowed
>                     # replace with our custom method
>     SpecialUser.allowed = PF2SpecialUser.PF2SpecialUser_allowed
>

--
Anything that happens, happens.  --Douglas Adams




More information about the Zope mailing list