[Patches] [ python-Patches-1171417 ] bug fix for islice() in docs

SourceForge.net noreply at sourceforge.net
Sun Mar 27 20:49:03 CEST 2005


Patches item #1171417, was opened at 2005-03-27 11:03
Message generated for change (Settings changed) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1171417&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Pernici Mario (pernici)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: bug fix for islice() in docs

Initial Comment:
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.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1171417&group_id=5470


More information about the Patches mailing list