Chris Jerdonek <chris.jerdo...@gmail.com> added the comment: 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__(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14528> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com