Skip to main content

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!

https://img.shields.io/travis/jacquev6/variadic/master.svg https://img.shields.io/coveralls/jacquev6/variadic/master.svg https://img.shields.io/codeclimate/github/jacquev6/variadic.svg https://img.shields.io/scrutinizer/g/jacquev6/variadic.svg https://img.shields.io/pypi/dm/variadic.svg https://img.shields.io/pypi/l/variadic.svg https://img.shields.io/pypi/v/variadic.svg https://img.shields.io/pypi/pyversions/variadic.svg https://img.shields.io/pypi/status/variadic.svg https://img.shields.io/github/issues/jacquev6/variadic.svg https://badge.waffle.io/jacquev6/variadic.png?label=ready&title=ready https://img.shields.io/github/forks/jacquev6/variadic.svg https://img.shields.io/github/stars/jacquev6/variadic.svg

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)

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)

Source distribution for variadic 0.1.4
File Size Uploaded
variadic-0.1.4.tar.gz 5.8 kB 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

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

0.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page