Skip to main content

@listify decorator - return a list instead of a generator

Project description

Installation

$ [sudo] pip install listify

Functions

function __doc__
listify.listify(func) @listify decorator

Examples

yield + list()

>>> def func():
        yield "value"

>>> list(func())

list.append()

>>> def func():
        result = []
        result.append("value")
        return result

@listify

>>> @listify
    def func():
        yield "value"

python-readme-generator

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

listify-2019.4.13.tar.gz (1.4 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