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

All Samples(8)  |  Call(2)  |  Derive(0)  |  Import(6)

        def mapply(object, positional=(), keyword={},
           debug=None, maybe=None,
           missing_name=default_missing_name,
           handle_class=default_handle_class,
           context=None, bind=0,
           ):

    if hasattr(object,'__bases__'):
        f, names, defaults = handle_class(object, context)
    else:
        try:
            f, count = zope.publisher.publish.unwrapMethod(object)
        except TypeError:
            if maybe:
                return object
            raise
        code = f.func_code
        defaults = f.func_defaults
        names = code.co_varnames[count:code.co_argcount]

    nargs=len(names)
    if positional:
        positional=list(positional)
        if bind and nargs and names[0]=='self':
            positional.insert(0, missing_name('self', context))
        if len(positional) > nargs: raise TypeError, 'too many arguments'
        args=positional
    else:
        if bind and nargs and names[0]=='self':
            args=[missing_name('self', context)]
        else:
            args=[]

    get=keyword.get
    nrequired=len(names) - (len(defaults or ()))
    for index in range(len(args), len(names)):
        name=names[index]
        v=get(name, args)
        if v is args:
            if index < nrequired: v=missing_name(name, context)
            else: v=defaults[index-nrequired]
        args.append(v)

    args=tuple(args)
    if debug is not None: return debug(object,args,context)
    else: return object(*args)
        


src/r/e/reg-0.6/reg/lookup.py   reg(Download)
 
from .sentinel import Sentinel
from .mapply import mapply
 
SENTINEL = Sentinel('Sentinel')
        if func is default:
            return default
        result = mapply(func, *args, lookup=self, **kw)
        if result is None and default is not SENTINEL:
            return default

src/r/e/reg-HEAD/reg/lookup.py   reg(Download)
 
from .sentinel import Sentinel
from .mapply import mapply
 
SENTINEL = Sentinel('Sentinel')
        if func is default:
            return default
        result = mapply(func, *args, lookup=self, **kw)
        if result is None and default is not SENTINEL:
            return default

src/r/e/reg-0.6/reg/__init__.py   reg(Download)
from .compose import ListClassLookup, ChainClassLookup, CachingClassLookup
from .generic import generic
from .mapply import mapply, arginfo
from .sentinel import Sentinel
 

src/r/e/reg-HEAD/reg/__init__.py   reg(Download)
from .compose import ListClassLookup, ChainClassLookup, CachingClassLookup
from .generic import generic
from .mapply import mapply, arginfo
from .sentinel import Sentinel
 

src/z/o/Zope2-2.13.22/src/ZPublisher/Publish.py   Zope2(Download)
from Request import Request
from maybe_lock import allocate_lock
from mapply import mapply
from zExceptions import Redirect
from zope.publisher.interfaces import ISkinnable

src/z/o/Zope-HEAD/src/ZPublisher/Publish.py   Zope(Download)
from zope.security.management import newInteraction, endInteraction
 
from .mapply import mapply
from .maybe_lock import allocate_lock
from .pubevents import PubAfterTraversal