Raymond Hettinger added the comment:
Closing for the reasons lists above.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: commit review -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
___
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
___
Raymond Hettinger added the comment:
ysj: The equivalent means roughly equivalent not precisely equivalent.
The purpose of the code in the docs is to help communicate what islice() is all
about. Practicality beats purity in this regard. I know of no one who has
ever been mislead by the
Serhiy Storchaka added the comment:
LGTM. However note, that for 2.7 the patch should be modified (maxsize -
maxint, range - xrange).
--
nosy: +serhiy.storchaka
stage: needs patch - commit review
versions: +Python 3.4
___
Python tracker
Brian Brazil brian.bra...@gmail.com added the comment:
The attached patch fixes this
--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file26283/issue11908-islice-docs.patch
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
keywords: +easy
nosy: +ezio.melotti
stage: - needs patch
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
ysj.ray ysj@gmail.com added the comment:
`step` argument for xrange() could not be 0.
But `s.stop or sys.maxint` is really a problem, in the case of `s.stop == 0`.
So the given `Equivalent to` python code in the doc is not precisely equivalent
to the c implementation. The doc needs a fix.
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
I've got from here. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: -Python 2.5, Python 2.6, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
New submission from Ram Rachum cool...@cool-rr.com:
In the documentation for `itertools.islice` I see this line:
it = iter(xrange(s.start or 0, s.stop or sys.maxint, s.step or 1))
Is it really okay to do `s.stop or sys.maxint`? I'm assuming this was targeting
`None`, but what if `s.stop
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: docs@python - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11908
___
14 matches
Mail list logo