[Python-Dev] PEP 340: propose to get rid of 'as' keyword
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri May 6 04:27:54 CEST 2005
Fredrik Lundh wrote:
> the current
> proposal stems from the observation that "for-loop plus generators" in
> today's Python does in fact provide a block implementation that solves
> many use cases in an elegant way.
>
> PEP 340 builds on this, sorts out a couple of weak points in the current
> design, and adds an elegant syntax for most remaining use cases.
I still can't help feeling we're making a cart/horse
ordering error here, though. Part of me regards the
"for-loop plus generators" idea as an elegant hack,
whose elegance only extends as far as it *doesn't*
require anything beyond existing syntax and semantics.
If new syntax and tricky new interactions with iterators
are needed to support it, it doesn't seem so elegant
any more.
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list