@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"
Project details
Release history Release notifications | RSS feed
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.3.22.tar.gz
(1.4 kB
view hashes)
Built Distribution
Close
Hashes for listify-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d142b21dc0126e7939d7b75080bd23860939f47f4acec21dadf2a1f20e5a7f10 |
|
MD5 | a8bba3c1030729c3d90da77a74ca6f83 |
|
BLAKE2b-256 | 0b2d41f7e7ecf6e454375e12f901e92aa56686b67ae339e1bae19a10ea1ab62e |