Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix for islice() in docs #41764

Closed
pernici mannequin opened this issue Mar 27, 2005 · 2 comments
Closed

bug fix for islice() in docs #41764

pernici mannequin opened this issue Mar 27, 2005 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@pernici
Copy link
Mannequin

pernici mannequin commented Mar 27, 2005

BPO 1171417
Nosy @rhettinger
Files
  • libitertools.diff: diff to cvs: python/python/dist/src/Doc/lib/libitertools.tex Revision 1.34
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/rhettinger'
    closed_at = <Date 2005-03-27.20:20:11.000>
    created_at = <Date 2005-03-27.16:03:21.000>
    labels = ['library']
    title = 'bug fix for islice() in docs'
    updated_at = <Date 2005-03-27.20:20:11.000>
    user = 'https://bugs.python.org/pernici'

    bugs.python.org fields:

    activity = <Date 2005-03-27.20:20:11.000>
    actor = 'rhettinger'
    assignee = 'rhettinger'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-03-27.16:03:21.000>
    creator = 'pernici'
    dependencies = []
    files = ['6572']
    hgrepos = []
    issue_num = 1171417
    keywords = ['patch']
    message_count = 2.0
    messages = ['48060', '48061']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'pernici']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1171417'
    versions = ['Python 2.4']

    @pernici
    Copy link
    Mannequin Author

    pernici mannequin commented Mar 27, 2005

    The python implementation of islice() in
    itertools-functions.html
    fails the following test, unlike itertools.islice():

    def test_islice():
      it = iter(range(10))
      a = list(islice(it, 0,3))
      next = it.next()
      assert next == 3
    
    test_islice()

    A fix is given in the attached file.

    @pernici pernici mannequin closed this as completed Mar 27, 2005
    @pernici pernici mannequin assigned rhettinger Mar 27, 2005
    @pernici pernici mannequin added the stdlib Python modules in the Lib dir label Mar 27, 2005
    @pernici pernici mannequin closed this as completed Mar 27, 2005
    @pernici pernici mannequin assigned rhettinger Mar 27, 2005
    @pernici pernici mannequin added the stdlib Python modules in the Lib dir label Mar 27, 2005
    @rhettinger
    Copy link
    Contributor

    Logged In: YES
    user_id=80475

    Checked in an alternate version of the supplied patch.
    Also, added the given test.

    See:
    Doc/lib/libitertools.tex 1.35 and 1.32.2.1
    Lib/test/test_itertools.py 1.39

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant