pytilities.aop.commands

class pytilities.aop.commands.advised

Yielding advised, will return the function that is advised by the aspect.

Do not use this to call the actual function, you should use proceed for that.

__weakref__

list of weak references to the object (if defined)

class pytilities.aop.commands.arguments

Yielding arguments, will return (args, kwargs).

Args is a tuple and kwargs a frozendict.

Note: even though get, set, delete advice would never have kwargs; it is always provided. This allows you to share the same bit of advice among multiple types of advice, and also be able to use the self param (the first arg to args, for any type of advice)

__weakref__

list of weak references to the object (if defined)

class pytilities.aop.commands.name

Yielding name, will return the name of the attribute that was called.

__weakref__

list of weak references to the object (if defined)

class pytilities.aop.commands.obj

Yielding obj, will return the object to which the advice was applied

__weakref__

list of weak references to the object (if defined)

class pytilities.aop.commands.proceed

Call advised attribute with given args when yielded.

Don’t forget to include a self argument, if needed.

Its return is sent back to the advice.

__init__()
__weakref__

list of weak references to the object (if defined)

class pytilities.aop.commands.return_(retval)

Return last return value

If yield return_ is used, the return of the last yield proceed is used. If given an argument, that is used as return value.

__init__(retval)
__weakref__

list of weak references to the object (if defined)

Previous topic

pytilities.aop.aspects.view

Next topic

pytilities.aop.functions

This Page