Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94509 > unrolled thread
| Started by | Laura Creighton <lac@openend.se> |
|---|---|
| First post | 2015-07-24 17:47 +0200 |
| Last post | 2015-07-24 17:47 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: register cleanup handler Laura Creighton <lac@openend.se> - 2015-07-24 17:47 +0200
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-07-24 17:47 +0200 |
| Subject | Re: register cleanup handler |
| Message-ID | <mailman.951.1437752878.3674.python-list@python.org> |
In a message of Fri, 24 Jul 2015 10:57:30 -0400, Neal Becker writes:
>I know we have try/finally, but I don't think that helps here, because
>code_executed_unconditionally couldn't be inside the try. Or am I missing
>something obvious?
I think so. Either that or I am badly misunderstanding you. What is
wrong with
try:
if (condition):
do_something_needing_cleanup
else:
do_something_else
code_executed_unconditionally
finally:
do_cleanup
Laura
Back to top | Article view | comp.lang.python
csiph-web