[docs] Bug in `itertools.combinations` documentation (equivalent function)

Vladislav Zorov psionski at gmail.com
Thu Mar 21 21:43:12 CET 2013


Hello, dear documentation maintainers!

Present in     : all versions of the documentation (2.6.8 - 3.4.0)
Example URL:
http://docs.python.org/3.4/library/itertools.html#itertools.combinations
Description    : The `else: return` part is incorrectly indented on the
same level as `for`, thus appearing to be part of the `while` loop.

while True:
        for i in reversed(range(r)):
            if indices[i] != i + n - r:
                break
        else:
            return

Thank you for giving me so, so much to read! I hope I didn't misunderstand
the code - forgive me if I did.
--
Best Regards,
Vladislav Zorov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130321/faa67dd0/attachment.html>


More information about the docs mailing list