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

All Samples(7)  |  Call(0)  |  Derive(0)  |  Import(7)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
    d = {}
    for k, v in iterable:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

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)

src/z/o/Zope2-2.13.22/src/Products/PageTemplates/ZopePageTemplate.py   Zope2(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.ZopeGuards import safe_builtins
from Acquisition import Acquired
from Acquisition import Explicit

src/d/o/DocumentTemplate-2.13.2/src/DocumentTemplate/security.py   DocumentTemplate(Download)
 
from types import FunctionType
from AccessControl.ZopeGuards import safe_builtins
 
for name, v in safe_builtins.items():

src/a/c/AccessControl-3.0.8/src/AccessControl/tests/testZopeGuards.py   AccessControl(Download)
    def test_apply(self):
        from AccessControl import Unauthorized
        from AccessControl.ZopeGuards import safe_builtins
        sm = SecurityManager(1) # rejects
        old = self.setSecurityManager(sm)
    def testDictCreation(self):
        from AccessControl.ZopeGuards import safe_builtins
        d = safe_builtins['dict']
        self.assertEquals(d(), {})
        self.assertEquals(d({1:2}), {1:2})
    def testListCreation(self):
        from AccessControl.ZopeGuards import safe_builtins
        l = safe_builtins['list']
        self.assertEquals(l(), [])
        self.assertEquals(l([1,2,3]), [1,2,3])