Skip to content

itertools.chain should evaluate lazily #3787

@rng-dynamics

Description

@rng-dynamics

CPython:

>>> from itertools import *
>>> a = chain.from_iterable(repeat(range(2)))
>>> next(a)
0
>>> next(a)
1
>>> next(a)
0

RustPython does not evaluate lazily and the call to from_iterable never returns:

>>>>> from itertools import *
>>>>> a = chain.from_iterable(repeat(range(2)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions