Generic transparent proxies via a C extension module
Python C
Latest commit ba25030 May 9, 2016 @tseaver tseaver Merge pull request #14 from zopefoundation/fix-tests-wo-zope-security
Fix tests w/o zope security

README.rst

zope.proxy

Latest Version https://travis-ci.org/zopefoundation/zope.proxy.png?branch=master Documentation Status

Proxies are special objects which serve as mostly-transparent wrappers around another object, intervening in the apparent behavior of the wrapped object only when necessary to apply the policy (e.g., access checking, location brokering, etc.) for which the proxy is responsible.

zope.proxy is implemented via a C extension module, which lets it do things like lie about its own __class__ that are difficult in pure Python (and were completely impossible before metaclasses). It also proxies all the internal slots (such as __int__/__str__/__add__).