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 chris.jerdonek
Recipients chris.jerdonek, docs@python, georg.brandl
Date 2012-04-08.10:39:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333881557.53.0.0156906866109.issue14528@psf.upfronthosting.co.za>
In-reply-to
Content
It is not "so important."  I just feel that the change should be acknowledged somewhere -- insofar as the existing user documentation on iterator types already discusses __iter__().  As it stands now, the Python 2 documentation is a bit misleading because it seems to suggest that strings implement __iter__().

With regard to falling back to __getitem__(), that might actually be worth mentioning in the section on iterator types.  Up until today, I didn't know there was a distinction between a "sequence protocol" and an "iterator protocol," as discussed here, for example--

http://blog.axant.it/archives/306

For user code, the user might want different behavior depending on whether something behaves like a list.  For that, they might be relying on something like the presence of __iter__().
History
Date User Action Args
2012-04-08 10:39:17chris.jerdoneksetrecipients: + chris.jerdonek, georg.brandl, docs@python
2012-04-08 10:39:17chris.jerdoneksetmessageid: <1333881557.53.0.0156906866109.issue14528@psf.upfronthosting.co.za>
2012-04-08 10:39:16chris.jerdoneklinkissue14528 messages
2012-04-08 10:39:16chris.jerdonekcreate