Skip to main content

Argument expansion of objects

Project description

Python package that provides argument expansion of objects.

It was created to enable a sane way of entering arguments gathered from
argparse into your program, without the need to pass round an arguments object.

>>> import argspander
>>> @argspander.expand
... def f(a, b, c):
... print "a: %s, b: %s, c: %s" % (a, b, c)
>>> f(3, 2, 1)
a: 3, b: 2, c: 1
>>> class Args(): # similar to the object return by argparse
... a = 3
... b = 2
... c = 1
>>> f(Args(), expand=True)
a: 3, b: 2, c: 1

Project details

Download files

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

Files for argspander, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size argspander-0.1.3.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page