Steve D'Aprano <[email protected]>: > or you can let the context manager do what it does, and write your own code > to do what you do: > > try: > with ...: > ... > except: > ...
Even better:
try:
a = open(...)
except ...:
...
with a:
...
You want to catch exceptions immediately after (potentially) raising
them.
Marko
--
https://mail.python.org/mailman/listinfo/python-list
