variadic is a Python (2.7+ and 3.4+) function decorator to write variadic functions accepting a mix of arguments and iterables of those arguments. Oh, and they keep their argspec, so tools doing introspection (Sphinx doc, IDEs, etc.) will work well. No ugly f(*args, **kwds) in your doc!
Note that PEP 448 makes variadic obsolete: if you’re using Python 3.5+, you should keep plain variadic functions and call them with several argument unpackings.
It’s licensed under the MIT license. It’s available on the Python package index, its documentation and its source code are on GitHub.
Questions? Remarks? Bugs? Want to contribute? Open an issue!
Quick start
Install from PyPI:
$ pip install variadic
Import:
>>> from variadic import variadic
Define a function:
>>> @variadic(int) ... def f(*args): ... return args >>> f(1, 2, [3, 4], xrange(5, 8)) (1, 2, 3, 4, 5, 6, 7)
Metadata
Release files for variadic 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| variadic-0.1.4.tar.gz | 5.8 kB | Without provenance | Details |
Release files / variadic-0.1.4.tar.gz
| Download URL | variadic-0.1.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
120ae11f73e921ec673bc701ad088ef871eb040d84ffb72fac0d582fc2fab0cc
|
|
BLAKE2b-256 checksum How to use checksums |
d600924d69f9b42b3b4157ecbed4dab677c8bfbfde25fbb87509e3b468e07034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for variadic 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.