Skip to main content

Irritable

https://img.shields.io/pypi/v/irritable.svg https://img.shields.io/travis/timb07/irritable.svg Documentation Status Updates

Irritable implements broken iterators called irritables

Features

Iterators are defined in the docs ; the definition includes what constitutes a broken implementation:

4.5. Iterator Types

[…]

Once an iterator’s __next__() method raises StopIteration, it must continue to do so on subsequent calls. Implementations that do not obey this property are deemed broken.

Irritables are like iterables, but deliberately broken. The following types of brokenness are supported:

  • after next() first raises StopIteration, subsequent calls will raise StopIrritation instead;

  • if the irritator is instantiated with resume=True, calling next() may raise StopIteration when items remain still remain in the container; subsequent calls to next() will return the remaining items as usual until none remain;

  • if the irritator is instantiated with repeat=True, after the iterator has been exhausted and raises StopIteration, the iterator is reset and can be iterated over again ad infinitum; in this case next() will never raise StopIrritation;

Credits

The idea for irritators came during Trey Hunner’s talk “Loop better: a deeper look at iteration in Python” at DjangoCon AU 2017.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2017-08-08)

  • First release on PyPI.

Metadata

Release files for irritable 0.1.0

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

Source distribution (sdist)

Source distribution for irritable 0.1.0
File Size Uploaded Provenance
irritable-0.1.0.tar.gz 12.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for irritable 0.1.0
File Interpreter ABI Platform
irritable-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 17.5 kB

Release files / irritable-0.1.0.tar.gz

Download URL irritable-0.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d0e4084e074b18042115aa6dac2e8bcec5612a1f6373d4d9194cd4894983311a
BLAKE2b-256 checksum
How to use checksums
0affa5acbdf26ff2edbe6d37fe9de7ec06d8c4ba0a84bbfb21492df00037a0e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / irritable-0.1.0-py2.py3-none-any.whl

Download URL irritable-0.1.0-py2.py3-none-any.whl
Size 5.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d6091be1967c32aab5b670d1917c32e6580e691a8078ba6906174c71eb4581b8
BLAKE2b-256 checksum
How to use checksums
79610f1f7d94defca7c78a43282894d3dd11050926697e4a9b24020bfcd4ae0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for irritable 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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