Skip to main content

yzal

Lazy evaluation for Python.

Build status Test coverage

PyPI Package latest release Supported implementations Supported versions PyPI Wheel

Usage

To use yzal:

from yzal import lazy, strict

@lazy
def add(x, y):
    sum = x + y
    print('Adding {:d} + {:d} = {:d}', x, y, sum)

The following only creates a Thunk, it does not run the lazy function above.

>>> sum = add(3, 7)

There are two ways to get the result of the lazy evaluation. The first is simply to perform an operation that requires a strict value.

>>> 5 + sum
Adding 3 + 7 = 10
15

The second way is to explicitly request a strict value.

>>> sum = add(3, 7)
>>> strict(sum)
Adding 3 + 7 = 10
10

Requirements

Installation

yzal is on PyPI so the best way to install it is:

$ pip install yzal

Thanks

We wish to thank the following projects, without which yzal would have been much harder to write:

Metadata

Release files for yzal 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yzal 0.0.5
File Size Uploaded Provenance
yzal-0.0.5.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yzal 0.0.5
File Interpreter ABI Platform
yzal-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / yzal-0.0.5.tar.gz

Download URL yzal-0.0.5.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c04396ce283a408b09995e30705a3f5bd8ebb4a97a1667ae1b2daebc0c721058
BLAKE2b-256 checksum
How to use checksums
aa60f670c7e6a3f4d9b65a12abef5f69fd230db16bcc55c4101bb9f98c75ea87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / yzal-0.0.5-py3-none-any.whl

Download URL yzal-0.0.5-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c13b68181dcc707dc797b645c1e279d201faa096ba52008724a9ed59197d97a
BLAKE2b-256 checksum
How to use checksums
08918ce964996d7bf355772a86a1472a3ec5691388c137d9173ee22b5fe7dbf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Security for yzal 0.0.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page