Message157785
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__(). |
|
Date |
User |
Action |
Args |
2012-04-08 10:39:17 | chris.jerdonek | set | recipients:
+ chris.jerdonek, georg.brandl, docs@python |
2012-04-08 10:39:17 | chris.jerdonek | set | messageid: <1333881557.53.0.0156906866109.issue14528@psf.upfronthosting.co.za> |
2012-04-08 10:39:16 | chris.jerdonek | link | issue14528 messages |
2012-04-08 10:39:16 | chris.jerdonek | create | |
|