Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/e/r/erp5-HEAD/product/ERP5Type/patches/Restricted.py   erp5(Download)
from Acquisition import aq_acquire
from AccessControl import getSecurityManager
from AccessControl.ZopeGuards import (safe_builtins, _marker, Unauthorized,
    aq_validate, guard, guarded_getattr, guarded_iter, SafeIter, NullIter,
    ContainerAssertions, GuardedDictType, _dict_white_list)
    def next(self):
        ob = self._next()
        c = self.container
        guard(c, ob[0])
        guard(c, ob[1])
def guarded_sorted(seq, cmp=None, key=None, reverse=False):
    if not isinstance(seq, SafeIter):
        for i, x in enumerate(seq):
            guard(seq, x, i)
    return sorted(seq, cmp=cmp, key=key, reverse=reverse)
    def guarded_pop():
        v = s.pop()
        try:
            guard(s, v)
        except Unauthorized: