MCPcopy Create free account

hub / github.com/micheles/decorator / functions

Functions124 in github.com/micheles/decorator

↓ 9 callersFunctiong
(obj)
src/tests/documentation.py:1823
↓ 5 callersFunctioncheck
Make sure one passes the expected number of arguments
src/decorator.py:360
↓ 5 callersMethodcreate
Create a function from the strings name, signature and body. evaldict is the evaluation dictionary. If addsource is true an a
src/decorator.py:197
↓ 4 callersFunctionassertRaises
This works in Python 2.6 too
src/tests/test.py:22
↓ 4 callersFunctiongetfullargspec
A quick and dirty replacement for getfullargspec for Python 2.X
src/decorator.py:55
↓ 3 callersFunctiondecorate
decorate(func, caller) decorates a function using a caller. If the caller is a generator function, the resulting function will be a gener
src/decorator.py:224
↓ 3 callersFunctiondispatch_on
Factory of decorators turning a function into a generic function dispatching on the given arguments.
src/decorator.py:352
↓ 2 callersFunctionancestors
Get a list of virtual MROs, one for each type
src/decorator.py:388
↓ 2 callersFunctioniscoroutinefunction
(f)
src/decorator.py:66
↓ 1 callersMethod__init__
(self, func=None, name=None, signature=None, defaults=None, doc=None, module=None, funcdict=N
src/decorator.py:93
↓ 1 callersFunctionappend
Append ``a`` to the list of the virtual ancestors, unless it is already included.
src/decorator.py:334
↓ 1 callersFunctionbefore_after
(before, after)
src/tests/documentation.py:1700
↓ 1 callersFunctiondec
(f)
src/decorator.py:413
↓ 1 callersFunctiondecorator
decorator(caller) converts a caller function into a decorator
src/decorator.py:258
↓ 1 callersFunctiondecorator_apply
Decorate a function by preserving the signature even if dec is not a signature-preserving decorator.
src/tests/documentation.py:1433
↓ 1 callersFunctiongen123
()
src/tests/test.py:61
↓ 1 callersFunctionisgeneratorfunction
(caller)
src/decorator.py:72
↓ 1 callersMethodmake
Make a new function from a given template and update the signature
src/decorator.py:162
↓ 1 callersMethodupdate
Update the signature of func with the data in self
src/decorator.py:145
↓ 1 callersFunctionvancestors
Get a list of sets of virtual ancestors for the given types
src/decorator.py:376
Method_
(obj)
src/tests/test.py:249
Method__call__
Context manager decorator
src/decorator.py:304
Method__call__
(self, *args, **kwd)
src/tests/documentation.py:1605
Function__init__
(self, g, *a, **k)
src/decorator.py:314
Method__init__
(self, func, *args, **kw)
src/tests/documentation.py:1458
Method__init__
(self, func)
src/tests/documentation.py:1600
Method__init__
(self, **config)
src/tests/documentation.py:1726
Method__len__
(self)
src/tests/test.py:378
Method__len__
(self)
src/tests/test.py:407
Method__len__
(self)
src/tests/test.py:458
Method__len__
(self)
src/tests/test.py:466
Method__len__
(self)
src/tests/documentation.py:1785
Method__len__
(self)
src/tests/documentation.py:1792
Method__len__
(self)
src/tests/documentation.py:1845
Function_dispatch
(dispatch_args, *args, **kw)
src/decorator.py:429
Method_g
(obj)
src/tests/test.py:257
Function_memoize
(func, *args, **kw)
src/tests/documentation.py:1507
Function_trace
(f, *args, **kw)
src/tests/documentation.py:1443
Functiona_test_for_pylons
In version 3.1.0 decorator(caller) returned a nameless partial object, thus breaking Pylons. That must not happen again. >>> decorator(_
src/tests/documentation.py:1642
Methodadd
(func, const=1, *args, **kwargs)
src/tests/test.py:155
Functionblocking
(f, msg='blocking', *args, **kw)
src/tests/documentation.py:1529
Methodcatch_config_error
(method, app, *args, **kwargs)
src/tests/test.py:148
Functioncontextmanager
(func)
src/decorator.py:327
Methodd1
(f, *args, **kwargs)
src/tests/test.py:108
Methodd2
(f, *args, **kwargs)
src/tests/test.py:112
Methoddelete
Only the admin can delete objects
src/tests/documentation.py:1589
Functiondispatch_info
An utility to introspect the dispatch algorithm
src/decorator.py:419
Functionexample
()
src/tests/documentation.py:1482
Methodexample
(*args, **kw)
src/tests/test.py:135
Methodf
(x)
src/tests/test.py:158
Functionf1
Simulate some long computation
src/tests/documentation.py:1501
Methodf1
(x, y, z)
src/tests/test.py:116
Methodf2
(x, y, z)
src/tests/test.py:120
Functionfact
(n)
src/tests/documentation.py:1636
Functionfactorial
The good old factorial
src/tests/documentation.py:1629
Methodfunc
(**kw)
src/tests/test.py:139
Methodfunc_wrapper
()
src/tests/documentation.py:1465
Methodg
(obj)
src/tests/test.py:171
Methodg_A
(a)
src/tests/test.py:200
Methodg_B
(b)
src/tests/test.py:204
Functiong_container
(arg)
src/tests/documentation.py:1857
Methodg_int
(i)
src/tests/test.py:175
Functiong_iterable
(object)
src/tests/documentation.py:1831
Functiong_s
(arg)
src/tests/documentation.py:1853
Functiong_sized
(object)
src/tests/documentation.py:1827
Functiongen_func_dec
Decorator turning a function into a generic function
src/decorator.py:366
Functionget_init
(cls)
src/decorator.py:48
Functionget_length
(obj)
src/tests/documentation.py:1797
Functionget_length_set
(obj)
src/tests/documentation.py:1807
Functionget_length_sized
(obj)
src/tests/documentation.py:1802
Methodh
(obj)
src/tests/test.py:418
Methodh_container
(arg)
src/tests/test.py:426
Methodh_sized
(arg)
src/tests/test.py:422
Functionhello
>>> ba.__class__.__name__ 'ContextManager' >>> hello('michele') BEFORE hello michele AFTER
src/tests/documentation.py:1710
Methodi
(obj)
src/tests/test.py:440
Methodi_mapping
(arg)
src/tests/test.py:444
Methodi_sequence
(arg)
src/tests/test.py:448
Functionidentity_dec
(func)
src/tests/documentation.py:1475
Methodinsert
Only power users can insert objects
src/tests/documentation.py:1585
Functionmemoize
(*args, **kw)
src/tests/documentation.py:1489
Functionmemoize_uw
(func)
src/tests/documentation.py:1486
Functionoperation1
>>> operation1() operation1 is slow
src/tests/documentation.py:1878
Functionoperation2
>>> operation2() operation2 is slow
src/tests/documentation.py:1887
Functionregister
Decorator to register an implementation for the given types
src/decorator.py:407
Functionrestricted
Restrict access to a given class of users
src/tests/documentation.py:1568
Methodresult
(self)
src/tests/documentation.py:1470
Functionset_result
()
src/tests/documentation.py:1531
Functionsingledispatch_example1
()
src/tests/documentation.py:1819
Functionsingledispatch_example2
()
src/tests/documentation.py:1837
Methodsquare
(func, *args, **kw)
src/tests/test.py:70
Functiontail_recursive
(func)
src/tests/documentation.py:1624
Methodtest
(self)
src/tests/test.py:79
Methodtest_add1
(self)
src/tests/test.py:152
Methodtest_c_classes
(self)
src/tests/test.py:243
Methodtest_decorator_factory
(self)
src/tests/test.py:145
Methodtest_gen123
(self)
src/tests/test.py:68
Functiontest_kwonly_no_args
# this was broken with decorator 3.3.3 >>> @trace ... def f(**kw): pass ... >>> f() calling f with args (), {}
src/tests/documentation.py:1679
Functiontest_kwonly_star_notation
>>> @trace ... def f(*, a=1, **kw): pass ... >>> import inspect >>> inspect.getfullargspec(f) FullArg
src/tests/documentation.py:1688
Functiontest_kwonlyargs
>>> @trace ... def func(a, b, *args, y=2, z=3, **kwargs): ... return y, z ... >>> func('a', 'b', 'c', 'd'
src/tests/documentation.py:1668
Functiontest_kwonlydefaults
>>> @trace ... def f(arg, defarg=1, *args, kwonly=2): pass ... >>> f.__kwdefaults__ {'kwonly': 2}
src/tests/documentation.py:1659
next →1–100 of 124, ranked by callers