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 hiba
Recipients docs@python, hiba
Date 2017-06-22.17:19:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
class Reverse:
    """Iterator for looping over a sequence backwards."""
    def __init__(self, data): = data
        self.index = len(data)

    def __iter__(self):
        return self

    def next(self):
        if self.index == 0:
            raise StopIteration
        self.index = self.index - 1

The next() method in the above code snippet(from 9.9 Iterators section in Tutorial is not correctly overridden. It's missing the underscores.
Date User Action Args
2017-06-22 17:19:12hibasetrecipients: + hiba, docs@python
2017-06-22 17:19:12hibasetmessageid: <>
2017-06-22 17:19:12hibalinkissue30738 messages
2017-06-22 17:19:11hibacreate