[Python-Dev] Pre-PEP: Unifying try-except and try-finally

Jim Jewett jimjjewett at gmail.com
Thu May 12 16:43:45 CEST 2005


[Guido]
>>> Can I go ahead and approve this now?

[Michael Hudson]
>> While I see the cost of this PEP being pretty small, I see the benefit
>> the same way too.

[Guido]
> Sure. Let me approve it and we'll see if someone cares enough to implement it.

No one will scream if you approve it, but when you asked permission
it seemed somehow serious and permanent.  By itself, the change is 
fine -- but there is still a nagging worry that it might interact badly with 
PEP-340 (or 3XX) Resource Management blocks.

(1)  If people could write a single try statement instead of nesting them,
would they be less likely to factor the locking out into a separate statement?

(2)  If 340 ends up as a simple version that doesn't handle fancy except:
processing, would this change make PEP 340 look crippled in comparison?
Would people avoid Resource Managers as a matter of style?

-jJ


More information about the Python-Dev mailing list