osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Compilation of "except FooExc as var" adds useless store


06.01.19 17:35, Chris Angelico ????:
> On Mon, Jan 7, 2019 at 2:27 AM Serhiy Storchaka <storchaka at gmail.com> wrote:
>> Because there is a reason for such code.
> 
> What reason though??

I added references and excerpts in the previous message.

>> In short, the code
>>
>>       try:
>>           1/0
>>       except Exception as e:
>>           del e
>>
>> should work.
> 
> But obviously not, because the code was specifically written to set it
> to None first.
Did you tried it? It works.