GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — itertools.chain should evaluate lazily · Issue #3787 · RustPython/RustPython

itertools.chain should evaluate lazily #3787

New issue
Copy link
New issue
Copy link
Closed
#3788
Closed
itertools.chain should evaluate lazily#3787
#3788
Copy link

Description

@rng-dynamics
rng-dynamics
opened on Jun 14, 2022
Issue body actions

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)))
Reacted by Jeong, YunWon

Activity

  1. youknowone commented on Jun 14, 2022

    @youknowone
    youknowone
    on Jun 14, 2022
    Member
    More actions

    This test looks missing in CPython

    python/cpython#93815

  2. youknowone commented on Jun 14, 2022

    @youknowone
    youknowone
    on Jun 14, 2022
    Member
    More actions

    Ok, they are not interested in it. We will add it to extra_tests/snippets/stdlib_itertools.py.

  3. rng-dynamics commented on Jun 14, 2022

    @rng-dynamics
    rng-dynamics
    on Jun 14, 2022
    ContributorAuthor
    More actions

    Ok, they are not interested in it. We will add it to extra_tests/snippets/stdlib_itertools.py.

    In #3788 I added a similar test.

  4. youknowone
    closed this as completedin #3788on Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.