aop 0.2.0

Last updated:

0 purchases

aop 0.2.0 Image
aop 0.2.0 Images
Add to Cart

Description:

aop 0.2.0

# Advice[Aspect-oriented programming](https://en.wikipedia.org/wiki/Aspect-oriented_programming)## TODO1. FIX starred import1. Patch already imported objects (`patch_project`)## Usage```pythonimport aopdef multiply(context): print(context.args) print(context.kwargs) yield context.result *= 100aop.register( handler=multiply, modules=aop.match(equals='math'), targets=aop.match(regexp='(sin|cos)'))```Ok, let's check:```pythonIn [2]: import mathIn [3]: math.cos(0)(0,){}Out[3]: 100.0```

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.