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

Steven Bethard steven.bethard at gmail.com
Wed May 11 22:05:30 CEST 2005


On 5/11/05, Russell E. Owen <rowen at cesmail.net> wrote:
> I think this would be a useful enhancement. It simplifies the published
> documentation a bit (no need to document try/except as a separate entity
> from try/finally) and I have plenty of cases where I'd like to take
> advantage of it.

I have a feeling that it might actually be easier to continue to
document try/except and try/finally separately and then just give the
semantics of try/except/finally in terms of the other semantics.  Take
a look at the Java Language Specification[1] (pages 399-401) if you
want to see how nastly documenting try/except/finally can get.  And
they don't even have an else clause! ;-)

STeVe

[1]http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy


More information about the Python-Dev mailing list