A python library that can be used to have macros inside python functions through decorators.
Project description
PyMacro
Welcome to pymacro, a python library that you can use to have MACROS inside your python functions. It uses a decorator to find and replace macros inside of comments with valid python code. It can be used in the following manner.
from pymacro import macro
@macro
def func_with_macro():
# DEFINE x 10
print(x)
The DSL inside the comments is turned into valid python code.
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
python-pymacro-0.1.0.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for python_pymacro-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 216093c81c536d08ce9573d4f61264a507705cd5748d24600d4b09083defb8a8 |
|
MD5 | aef8871013dc9319af08b072c714c1e1 |
|
BLAKE2b-256 | 347f7402b1c68629b4810ae268df041c4d1554cf86eb936469164064e85c79bc |