[Python-Dev] Compilation of "except FooExc as var" adds useless store
Chris Angelico
rosuav at gmail.com
Sun Jan 6 09:44:23 EST 2019
On Mon, Jan 7, 2019 at 1:21 AM Steven D'Aprano <steve at pearwood.info> wrote:
> > I would
> > definitely find a behavior of merely clearing an "except" target
> > variable to be more understandable than magic fiddling with namespaces.
>
> I don't understand what this means. What is "clearing an except target"?
> Do you mean deleting the target name? Names are either bound to an
> object, or they aren't bound at all, so I don't know what it means to
> "clear" a name if it doesn't mean delete it.
Setting it to None before unbinding it. It's apparently not enough to
say "del e" - you have to do "e = None; del e". Check the OP.
ChrisA
More information about the Python-Dev
mailing list