Skip to main content

Overview

The howe project contains the Howe class. A Howe object is similar to a zip object, except that all the iterators have to run out at the same time. Otherwise an ExceptionGroup (containing the StopIteration exceptions from the iterators that did run out) will be raised. The project is named for E. Howe, one of the intentors of the zipper.

Installation

To install howe, you can use pip. Open your terminal and run:

pip install howe

Implementation

class Howe:
    def __init__(self, *args):
        self._args = [iter(x) for x in args]

    def __iter__(self):
        return self

    def __next__(self):
        elements = list()
        errors = list()
        for arg in self._args:
            try:
                element = next(arg)
            except StopIteration as error:
                errors.append(error)
            else:
                elements.append(element)
        if not len(errors):
            return tuple(elements)
        if len(elements):
            raise ExceptionGroup("Howe failed.", errors)
        raise StopIteration

License

This project is licensed under the MIT License.

Credits

Thank you for using howe!

Metadata

Release files for howe 1.0.4

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

Source distribution (sdist)

Source distribution for howe 1.0.4
File Size Uploaded
howe-1.0.4.tar.gz 2.9 kB Details

Built distribution (wheel)

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

Total release size: 6.5 kB

Release files / howe-1.0.4.tar.gz

Download URL howe-1.0.4.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4091f578ca354868883ee8a6b297e9638a461a639b9ee5a75a728c095bbb3ecd
BLAKE2b-256 checksum
How to use checksums
89bf0888713c5d1b6a5653620befbf13d8cdecf6cab21234e1cd44f047a24df5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / howe-1.0.4-py3-none-any.whl

Download URL howe-1.0.4-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c373b0a9487fefea3e84b432d79cfecbdc5f4caf8f1cb75d3dd65cc907532425
BLAKE2b-256 checksum
How to use checksums
e8595a4a5d2a50ba7ad53af6d8d5ec3b808b2ce0b05c618361220a35d9b42e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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