This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cool-RR
Recipients cool-RR, docs@python
Date 2011-04-22.17:37:25
SpamBayes Score 0.14706263
Marked as misclassified No
Message-id <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za>
In-reply-to
Content
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 == 0`? And `s.step` could (pathologically) be `0` too, no?
History
Date User Action Args
2011-04-22 17:37:26cool-RRsetrecipients: + cool-RR, docs@python
2011-04-22 17:37:26cool-RRsetmessageid: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za>
2011-04-22 17:37:25cool-RRlinkissue11908 messages
2011-04-22 17:37:25cool-RRcreate