zope.security.proxy — zope.security 4.0dev documentation

### Navigation

- index
- modules |
- next |
- previous |
- zope.security 4.0dev documentation »

# `zope.security.proxy`

`zope.security.proxy.` `getTestProxyItems`(proxy)

  Return a sorted sequence of checker names and permissions for testing

`zope.security.proxy.` `isinstance`(object, cls)

  Test whether an object is an instance of a type.

  This works even if the object is security proxied:

    >>> from zope.security.proxy import isinstance
    >>> class C1(object):
    ...     pass

    >>> c = C1()
    >>> isinstance(c, C1)
    True

    >>> from zope.security.checker import ProxyFactory
    >>> isinstance(ProxyFactory(c), C1)
    True

    >>> class C2(C1):
    ...     pass

    >>> c = C2()
    >>> isinstance(c, C1)
    True

    >>> from zope.security.checker import ProxyFactory
    >>> isinstance(ProxyFactory(c), C1)
    True

### Navigation

- index
- modules |
- next |
- previous |
- zope.security 4.0dev documentation »