@listify decorator - return a list instead of a generator
Project description
Installation
$ [sudo] pip install listify
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-2020.12.3.tar.gz
(1.4 kB
view details)
File details
Details for the file listify-2020.12.3.tar.gz
.
File metadata
- Download URL: listify-2020.12.3.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25e7d5b10136299d3ba86ad7fd8e4258eedcd3569aba1d270d621b3442b1f5f1 |
|
MD5 | 4fd4c298b6565ca3a6df03a91e04ded0 |
|
BLAKE2b-256 | bcfa8af6375eacd113e5897c01422a6694451ef05370c9ab874fe3398949a6d2 |