homepage

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 martin.panter
Recipients abarnert, martin.panter, ncoghlan, serhiy.storchaka
Date 2016年01月01日.05:34:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451626449.54.0.0151488220405.issue25958@psf.upfronthosting.co.za>
In-reply-to
Content
I don’t think you need to define __len__() to get an iterable, only __getitem__().
Also, if I understand your problem, Container would also be susceptible in theory, because membership testing via "in" and "not in" falls back to iteration. If you only define __getitem__(), your class is both iterable and a container, but it is neither an Iterable nor a Container. :)
History
Date User Action Args
2016年01月01日 05:34:09martin.pantersetrecipients: + martin.panter, ncoghlan, serhiy.storchaka, abarnert
2016年01月01日 05:34:09martin.pantersetmessageid: <1451626449.54.0.0151488220405.issue25958@psf.upfronthosting.co.za>
2016年01月01日 05:34:09martin.panterlinkissue25958 messages
2016年01月01日 05:34:09martin.pantercreate

AltStyle によって変換されたページ (->オリジナル) /