docs on for-loop with no __iter__?

Alex Martelli aleaxit at
Tue Sep 7 11:42:41 CEST 2004

Just <just at> wrote:

> In article <mailman.2962.1094543082.5135.python-list at>,
>  Steven Bethard <steven.bethard at> wrote:
> > It would have made describing the protocol somewhat more complex, but it
> > would 
> > have made using the protocol in a class simpler.  Moot point of course,
> > I'm fully convinced that changing the protocol is infeasible. =)
> Why on earth would you want to improve a protocol that's only there for
> legacy reasons, and has been replaced by something vastly better?

I think he wants to understand more than he actually wants any change.

Sometimes it helps to understand X to consider what alternatives there
could be to X, even though it's not practically feasible to implement
such alternatives.  At first I had a reaction quite similar to yours,
but I am currently holding this working hypothesis -- that it's about
understanding more than anything else.  And I do believe that
understanding why that now-obsolete protocol was indeed optimal, most
Pythonic, in its time, can enhance one's understanding of what Pythonic
means.  Of course, you're unfairly and genetically advantaged in that
understanding, but most of us have to work for it!-)


More information about the Python-list mailing list