[docs] [issue32868] python 3 docs' iterator example has python 2 code
report at bugs.python.org
Sun Feb 18 11:27:43 EST 2018
New submission from robotwizard <harikrishnan527 at gmail.com>:
Please note this is my first issue.
The documentation at https://docs.python.org/3/tutorial/classes.html#iterators on the second code block gives the example of iterating a string by creating an iterator out of it. However I tried it with python 3.5 and 3.6 and both give me a "str_iterator" which has no "next()" method. When I tried the code with python 2.7, it works.
assignee: docs at python
nosy: docs at python, robotwizard, willingc
title: python 3 docs' iterator example has python 2 code
versions: Python 3.6
Python tracker <report at bugs.python.org>
More information about the docs