Default scope of variables

Chris Angelico rosuav at gmail.com
Mon Jul 8 02:46:59 CEST 2013


On Mon, Jul 8, 2013 at 2:03 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> If you need more than two levels, you probably ought to re-design your
> code to be less confusing, otherwise you may be able to use ChainMap to
> emulate any number of nested scopes.

The subtransactions are primarily to represent the database equivalent
of a try/except block, so they need to be able to be nested
arbitrarily.

ChrisA



More information about the Python-list mailing list