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 ronaldoussoren
Recipients ronaldoussoren, vstinner
Date 2013-05-08.11:05:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368011143.2.0.441243237171.issue17932@psf.upfronthosting.co.za>
In-reply-to
Content
Create a class with a __getitem__ method but no __iter__:

class Seq (object):
    def __len__(self):
        return 5

    def __getitem__(self, idx):
        if idx > len(self):
            raise IndexError(idx)
        return idx * 2


i = iter(Seq())
History
Date User Action Args
2013-05-08 11:05:43ronaldoussorensetrecipients: + ronaldoussoren, vstinner
2013-05-08 11:05:43ronaldoussorensetmessageid: <1368011143.2.0.441243237171.issue17932@psf.upfronthosting.co.za>
2013-05-08 11:05:43ronaldoussorenlinkissue17932 messages
2013-05-08 11:05:43ronaldoussorencreate