This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients Mark.Shannon, oleksandr.suvorov, pablogsal
Date 2020-05-22.11:15:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>But then why I still can access this variable? Shouldn't it then be
resulting in NameError as it's undefined variable at this point of time?

I don't think so, this is the same as if you do:

def f(exc):
   del exc
   return exc

>>> f(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "", line 3, in f
    return exc
UnboundLocalError: local variable 'exc' referenced before assignment
Date User Action Args
2020-05-22 11:15:13pablogsalsetrecipients: + pablogsal, Mark.Shannon, oleksandr.suvorov
2020-05-22 11:15:13pablogsalsetmessageid: <>
2020-05-22 11:15:13pablogsallinkissue40728 messages
2020-05-22 11:15:13pablogsalcreate