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 r.david.murray
Recipients docs@python, r.david.murray, rhettinger, ztane
Date 2017-07-19.14:07:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1500473251.12.0.106904820094.issue30969@psf.upfronthosting.co.za>
In-reply-to
Content
I think you change is appropriate given that the "equivalent to" for the built in iterators contains the 'is' expression.

However, I also think we should drop that second whole paragraph, and in the previous paragraph say "...but are :term:`iterable`...".  Because conceptually what we do is iterate whatever we're given if iter doesn't return a TypeError, and it is iter that handles the fallback to the older __getitem__ protocol.  I don't see why we should re-explain the iteration protocol in the docs for 'in'.  (I haven't looked at how this is actually implemented, but the implementation ought to be equivalent to that or we will eventually run into bugs.)  I don't think this would result in any loss of precision or understandability, and in fact I think it would make it easier to understand.

See also issue 27605, which also wants to edit this section slightly.
History
Date User Action Args
2017-07-19 14:07:31r.david.murraysetrecipients: + r.david.murray, rhettinger, docs@python, ztane
2017-07-19 14:07:31r.david.murraysetmessageid: <1500473251.12.0.106904820094.issue30969@psf.upfronthosting.co.za>
2017-07-19 14:07:31r.david.murraylinkissue30969 messages
2017-07-19 14:07:30r.david.murraycreate