cotoolz 0.1
A set of utility functions for coroutines.
Example
In this example we will be showing comap. comap is like __builtins__.map; however, it knows about the coroutine protocol (send, throw, and close). Here we will show how you can map over a coroutine while still being able to send into it.
>>> def my_coroutine():
... yield (yield (yield 1))
>>> from cotoolz import comap
>>> cm = comap(lambda a: a + 1, my_coroutine())
>>> next(cm)
2
>>> cm.send(2)
3
>>> cm.send(3)
4
>>> cm.send(4)
Traceback (most recent call last):
...
StopIteration
Dependencies
cotoolz depends on CPython 3 and some means of compiling C99. We recommend using gcc to compile cotoolz.
Metadata
Release files for cotoolz 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cotoolz-0.1.6.tar.gz | 19.1 kB | Without provenance | Details for cotoolz-0.1.6.tar.gz |
Release files / cotoolz-0.1.6.tar.gz
| Download URL | cotoolz-0.1.6.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6b444081f5c4a35f28ddf205882c2349fce899317b0ae8ecb608caf90233bb8
|
|
BLAKE2b-256 checksum How to use checksums |
a8e6988d879989c8f0c0e65e620236ff237c13a3f416b69d77fd7ce386702bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cotoolz 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.