Provides convenient utils for late decorating, based on idea of aspects-oriented programming
Project description
Classic Aspects
This package provides convenient utils for late decorating, based on idea of aspects-oriented programming. Part of project "Classic".
Usage:
from classic.aspects import PointCut
points = PointCut()
@points.join_point
def add_numbers(left, right):
return left + right
assert add_numbers(1, 2) == 3 # Returns 3
def some_decorator(fn):
def wrapper(*args, **kwargs):
print('Function called!')
return fn(*args, **kwargs)
return wrapper
add_numbers.join(some_decorator)
assert add_numbers(1, 2) == 3 # Returns 3 and print "Function called!"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
classic-aspects-0.0.1.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file classic-aspects-0.0.1.tar.gz
.
File metadata
- Download URL: classic-aspects-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb67f8e4de3ddd8963ab0401f630c3df8192d2b594b484511f45558ae572599 |
|
MD5 | dcef422469bd334b4a4518e653fe6c6f |
|
BLAKE2b-256 | d0f2769ede4c66dde024274ebd8ddb5ace8ce1670ddf0615e292619788f21e03 |
File details
Details for the file classic_aspects-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: classic_aspects-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2eec257f6816b3f9b58881e50c958bf40978f15721de5885a30ef5775469e36 |
|
MD5 | e7f04312be99ffdae6843eeb78c3eb57 |
|
BLAKE2b-256 | 3db16eb9ecc0aa0f95e7981c219b51d50c6f777f1f4b73b159883f2ff0bd0206 |