Skip to main content

Decorator for very-variadic functions

Project description

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!

It’s licensed under the MIT license. It’s available on the Python package index, its documentation is hosted by Python and its source code is 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

variadic-0.1.2.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page