skip to navigation
skip to content

variadic 0.1.2

Decorator for very-variadic functions

Package Documentation

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!

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)
 
File Type Py Version Uploaded on Size
variadic-0.1.2.tar.gz (md5) Source 2015-09-06 5KB