I was wondering whether a worthwhile extension might be to allow the `with` statement to have an `except` and `else` clauses which would have the same
semantics as wrapping the `with` block with a try - for example the above would now look like:
Treating the 'with' as an implied `try` would reduce the march to the right - now the key processing of the resource is now indented only one level - and the association of the exception
with open('config.cfg', 'r') as cfg:
# Process the open file
config = load_config(cfg)
except FileNotFound:
logging.info('Config file not found - using default configuration')
except PermissionError:
logging.warning('Cannot open config .cfg - using default configuration')
config = default_config()
else:
logging.info('Using config from config.cfg')
from the `with` block is syntactically clear.