[Python-ideas] If branch merging

Nick Coghlan ncoghlan at gmail.com
Sun Jun 7 17:54:18 CEST 2015

On 8 June 2015 at 01:29, Chris Angelico <rosuav at gmail.com> wrote:
> There's no concept of nested/limited scope here, although I'm sure
> that this particular case could be turned into a subscope without
> breaking anyone's code (I honestly cannot imagine there being ANY code
> that depends on the name getting unset!), if Python ever grows support
> for subscopes that aren't associated with nested functions.

The unsetting of bound exceptions is also merely a language quirk
introduced to cope with the implicit exception chaining introduced in
PEP 3134. The circular reference from the traceback frame back to the
bound exception caused a lot of uncollectable cycles that were
resolved by automatically dropping the frame's reference to the bound


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list