[Python-Dev] PEP 310 Status
Samuele Pedroni
pedronis at bluewin.ch
Tue Nov 16 17:42:57 CET 2004
Michael Walter wrote:
> Hello everyone,
>
> I was just wondering about the status of PEP 310 ("with" statement) -
> has there been any concensus/plan to implement it? (I tried to google
> the answer, but failed ;-)
I suppose someone should write an implementation for it, and start
championing for it again (And a new keyword may be needed because 'with'
is preempted). The lingering suspect that a more general solution could
enable it as application and more has worked a bit against it, also by
> How about the potentiel inclusion of user-defined "blocks"? I suppose
> this would be only a Python 3000 thing, if ever included?
>
generating enormous discussions about this one other topic that went
mostly nowhere. Don't know whether having another one is a good idea.
Beforehand someone should write a PEP with a concrete proposal in the
fullness of its details, or maybe even a set of different PEP/proposals.
There is no self-evident and beautiful solution for this, it seems.
Because of some aspects of Python ( focus on readability, non uniformity
(think vs Lisp/Smalltalk) e.g. expression vs statement distinction,
class def suite semantics vs. functions definitions..., generators
design decisions) this will very likely entail some sort of compromise.
Depending of how much expressiveness one wants, because of
non-uniformity, the "right" solution may be even be macros, not just
blocks. For blocks things like:
- are we up to blurring a bit the expression vs. statement divide,
- can we live with a bit lisp-looking parenthesized constructs in
expressions,
- Or limiting things to just _one_ block "capture" statement is enough
- do we want to support class-def-like constructs? interested in
capturing order? markup construction?
- do we want anonymous function vs. suite semantics?
- what the is interaction with yield?
- or with ideas and likely need of rebinding for lexical-scoped variables
- etc
should be considered/addressed
regards
More information about the Python-Dev
mailing list