[Python-Dev] pep 310 (reliable acquisition/release pairs)
Michael Hudson
mwh at python.net
Mon Sep 22 07:50:38 EDT 2003
Holger Krekel <hpk at trillke.net> writes:
> hello,
>
> admittedly i only followed Brett's very nice summaries (thanks!)
> in the last month so i may have missed some details. But here are a few
> comments regarding "PEP 310 Reliable Acquisition/Release Pairs".
>
> The PEP actually is about interacting with the execution
> of a code block. It allows to define (one-shot) interception points
> for entering and leaving a code block. Now there are at least
> two interesting cases which the PEP does (quite explicitely) not cover:
>
> - what to do with exceptions
>
> - what to do with yield
>
> IMHO introducing a new block statement at this stage in language
> development warrants an effort to tackle these cases (and maybe more
> like e.g. allowing the handler to trigger looping).
>
> This is probably best done with trying to directly design a protocol between
> the "interpreter-loop" and the - what i'd call - the "execution handler".
Well, in writing PEP 310 (as I suspect you know) I was aiming for a
simple, almost entirely syntactic way of shortening a common pattern.
You seem to be gunning for something far deeper here.
[...]
> So while i am not strictly against the proposal i'd humbly ask for
> not hurrying into accepting the PEP as is. Python 2.4 is not closeby
> so i hope there is still some time to discuss this.
While I agree and am in no hurry to rush, I'm not sure I see that
accepting PEP 310 as is necessarily hinders your more subtle aims...
Cheers,
mwh
--
SCSI is not magic. There are fundamental technical reasons why it
is necessary to sacrifice a young goat to your SCSI chain now and
then. -- John Woods
More information about the Python-Dev
mailing list