Skip to main content

An implementation of multiple return values.

Project description

Unlike Lisp’s “values” function, Python lacks a way of creating a function that return multiple values where the caller by default only sees the first one. Simply add the @multiplereturn decorator to any function or method that return a tuple, and it will now return only the first item in that tuple to its callers. Wrap the call to a @multiplereturn decorated function with the values() function and the caller gets the original tuple.

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

MultipleReturn-0.1.0a1.zip (5.0 kB view hashes)

Uploaded Source

Built Distribution

MultipleReturn-0.1.0a1-py2.py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 2 Python 3

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