[Python-Dev] Merging PEP 310 and PEP 340-redux?

Jim Jewett jimjjewett at gmail.com
Thu May 12 16:17:00 CEST 2005


In  http://mail.python.org/pipermail/python-dev/2005-May/053652.html Nick wrote:

     terminate = True
     VAR1 = stmt_enter() # Omit 'VAR1 =' if no 'as' clause
     try:
         try:
             BLOCK1
         except TerminateBlock:
             raise # Disallow suppression of TerminateBlock
         except:
             terminate = False
             if not stmt_exit(*sys.exc_info()):
                 raise
         else:
             terminate = False
             stmt_exit()
     finally:
         if terminate:
             try:
                 stmt_exit(TerminateBlock, None, None)
             except TerminateBlock:
                 pass

This seems confusing to me, as if it were saying "OK, I don't want to 
finalize this, so I'll set terminate to false, but then finalize anyhow."

Would "terminated=False" (and getting set later to True) still meet
your requirements?  Or even "finalized=False"?  I realize that the
spelling of
finalise is a bugaboo, but presumably this is really a hidden variable,
instead of something that the user must type.  Or have I misunderstood
that as well?

-jJ


More information about the Python-Dev mailing list