On Sun, Jan 26, 2014 at 11:26 PM, Vajrasky Kok <sky.kok at speaklikeaking.com>wrote: > In case we are taking "not backporting anything at all" road, what is > the best fix for the document? > > Old > >>> itertools.repeat.__doc__ > 'repeat(object [,times]) -> create an iterator which returns the > object\nfor the specified number of times. If not specified, returns > the object\nendlessly.' > I would say no fix is needed for this doc because the signature suggests (correctly) that passing times by keyword is not supported. The following behavior further supports this interpretation. >>> from itertools import * >>> ''.join(repeat('a', times=-4)) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: long int too large to convert to int The ReST documentation may benefit from an addition of a warning that behavior of repeat() is "undefined" when times is passed by keyword. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20140126/66e8ea71/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4