[Python-Dev] PEP 343 - Abstract Block Redux

Steven Bethard steven.bethard at gmail.com
Sun May 15 19:27:24 CEST 2005


On 5/15/05, Paul Moore <p.f.moore at gmail.com> wrote:
> There were a *lot* of nice features with PEP 340. The initial
> discussion had a lot of people enthusiastic about all the neat things
> they could do with it. That's disappeared now, in a long series of
> attempts to "fix" the looping issue.

Having done the python-dev summary on this topic, I think the initial
"enthusiasm" you were seeing included a lot of "what if we did it this
way?" or "what if we extended this further in another way?" kind of
stuff.  When PEP 340 finally came out (around the end of the month),
the more extreme ideas were discarded.  So in some sense, PEP 340 was
the reason for the lack of "enthusiasm"; with the semantics laid out,
people were forced to deal with a specific implementation instead of a
variety of wild suggestions.

> No-one is looking at PEP 343, or
> Nick's PEP 3XX, and saying "hey, that's neat - I can do XXX with
> that!". This makes me feel that we've thrown out the baby with the
> bathwater.

I'd be surprised if you can find many examples that PEP 340 can do
that PEP 3XX can't.  The only real looping example we had was
auto_retry, and there's a reasonably simple solution to that in PEP
3XX.  You're not going to see anyone saying "hey that's neat - I can
do XXX with that!" because PEP 3XX doesn't add anything.  But for 95%
of the cases, it doesn't take anything away either.

> (Yes, I know PEP 342 is integral to many of the neat
> features, but I get the impression that PEP 342 is being lost - later
> iterations of the other two PEPs are going out of their way to avoid
> assuming PEP 324 is implemented...)

Not very far out of their way.  I split off PEP 342 from the original
PEP 340, and it was ridiculously easy for two reasons:
 * the concepts are very orthogonal; the only thing really used from
it in any of PEP 340 was the "yield" means "yield None" thing
 * there weren't *any* examples of using the "continue EXPR" syntax. 
PEP 342 is still lacking in this spot

If you want to get people enthused about PEP 342 again (which is the
right way to make sure it gets excepted), what would really help is a
bunch of good examples of how it could be used.

> Looping is definitely a wart. Looping may even be a real problem in
> some cases. There may be cases where an explicit try...finally remains
> better, simply to avoid an unwanted looping behaviour.
> 
> But I'll live with that to get back the enthusiasm for a new feature
> that started all of this. Much better than the current "yes, I guess
> that's good enough" tone to the discussion.

I'm convinced that such a tone is inevitable after 30 days and over
700 messages on *any* topic. ;-)

Ok, back to summarizing this fortnight's 380+ PEP 340 messages. ;-)

STeVe
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy


More information about the Python-Dev mailing list