[Python-Dev] Merging PEP 310 and PEP 340-redux?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat May 14 02:26:16 CEST 2005


Here's my vote on things at the moment:

+1 on

   do EXPR as VAR:
     ...

+1 on keeping the EXPR and VAR distinct.

+1 on keeping the do and generator protocols distinct.

+1 on not going out of our way to let the controller
catch exceptions or alter control flow. Let's keep it
as simple as we can.

-0.7 on directly giving generators do-protocol methods.
I'm not yet convinced that encouraging people to use
generators to implement block controllers is a good
idea. If we blur the distinction too much at this
stage, we may regret it later if we come up with a
better idea. Also I don't see that people will be
writing block controllers anywhere near as often as
iterators, so writing classes for them isn't going to
be a big chore. And people can always use a
do-protocol-to-generator adaptor if they really want.

Greg




More information about the Python-Dev mailing list