devel/py-makefun 1.15.4_1 DragonFly
Dynamically create python functions with a proper signature
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- BSD3CLAUSE
- Categories
- devel, python
- Package size
- 37.5 KiB, 216.7 KiB installed
Description
Makefun helps you create functions dynamically, with the signature of your choice. It was largely inspired by decorator and functools, and created mainly to cover some of their limitations.
The typical use cases are: * creating signature-preserving function wrappers - just like functools.wraps but with accurate TypeError exception raising when user-provided arguments are wrong, and with a very convenient way to access argument values.
* creating function wrappers that have more or less arguments that the function they wrap. A bit like functools.partial but a lot more flexible and friendly for your users. For example, I use it in my pytest plugins to add a requests parameter to users' tests or fixtures when they do not already have it.
* more generally, creating functions with a signature derived from a reference signature, or even creating functions with a signature completely defined at runtime.
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/py-makefun | 1.15.4_1 |
| FreeBSD | devel/py-makefun | 1.16.0_1 |
| OpenBSD | devel/py-makefun | 1.16.0 |
| NetBSD | devel/py-makefun | 1.16.0nb1 |
| HardenedBSD | devel/py-makefun | 1.16.0_1 |
| GhostBSD | devel/py-makefun | 1.16.0_1 |
Install
Binary package:
pkg install py311-makefun
From DPorts:
cd /usr/dports/devel/py-makefun && make install clean
Dependencies
Run dependencies 2
Configuration
No options to configure.
- Service scripts
- none