Make decorators with a before and after function
Project description
Simply make decorators with a before and after function.
Included Files
easyDecorator/easyDecorator.py - Make decorators with a before and after function
Installation
Python must be installed in order for Menu to be imported. Install python at https://www.python.org/download/. In the terminal type “cd path/to/this/directory” and then “python setup.py install”. This will add the menu module to your site-packages.
How to Use
Import eastDecorator:
from easyDecorator import easyDecorator as dec
or:
import easyDecorator.easyDecorator as dec
Make a decorator with before/after functions:
newDecorator = dec.decorator(before=beforeFunction,after=afterFunction) @newDecorator def someFunc(): pass
Decorate a function that doesn’t accept arguments so that it can:
@dec.giveArgs def funcWithoutArgs(): pass
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
Easy_Decorator-1.2.tar.gz
(1.3 kB
view details)
File details
Details for the file Easy_Decorator-1.2.tar.gz
.
File metadata
- Download URL: Easy_Decorator-1.2.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d84fe01c1b3d49a5dfe4d5ced51fc09f9db353d79e975160dd8f73e3f372202 |
|
MD5 | 4e60f56dce8c24b5fd5deee869dce116 |
|
BLAKE2b-256 | c7c529be459be1bd2c25c40db4e5b1359afe95967a3c1f0ad44c61d91d664782 |