Advice
Usage
import advice
def multiply(context):
print(context.args)
print(context.kwargs)
yield
context.result *= 100
advice.register(
handler=multiply,
modules=advice.match(equals='math'),
targets=advice.match(regexp='(sin|cos)')
)
Ok, let's check:
In [2]: import math
In [3]: math.cos(0)
(0,)
{}
Out[3]: 100.0
Release files for advice 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| advice-0.1.0.tar.gz | 4.0 kB | Details |
Release files / advice-0.1.0.tar.gz
| Download URL | advice-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
034ba1b4828fd60e0b6bf48fc6dafd76d15162da2ceb962865dbb1ed84794e5e
|
|
BLAKE2b-256 checksum How to use checksums |
3e1d34f2af428082f75340dbc7e4d3eb35a65c1291d2c8117a5f1ea7ab0cda33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.5.2
|