Antoine wrote:
> I thought it would be nice to have an idiom where several blocks of code
> are tried in order, regardless of whether they throw an exception or not:
>
> try:
> self.db_transaction.commit()
> then:
> self.tmpoutfile.close()
> then:
> self.destroy_shared_memory_handle()
> except Exception, e:
> logging.error("an exception occurred in cleanup: %s", e)
that's spelled "with nested" in Python 2.5. see:
http://docs.python.org/whatsnew/pep-343.html
</F>
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com