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 eric.smith
Recipients eric.smith, mscholle, steven.daprano
Date 2022-02-02.16:38:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643819925.71.0.298960918844.issue46612@roundup.psfhosted.org>
In-reply-to
Content
The "evaluate the target" part causes the UnboundLocalError, just as in:

>>> x=1
>>> def f():
...   x
...   x = x + 1
... 
>>> f()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in f
UnboundLocalError: local variable 'x' referenced before assignment
History
Date User Action Args
2022-02-02 16:38:45eric.smithsetrecipients: + eric.smith, steven.daprano, mscholle
2022-02-02 16:38:45eric.smithsetmessageid: <1643819925.71.0.298960918844.issue46612@roundup.psfhosted.org>
2022-02-02 16:38:45eric.smithlinkissue46612 messages
2022-02-02 16:38:45eric.smithcreate