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 levkivskyi
Recipients christian.heimes, levkivskyi
Date 2016-09-21.15:37:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1474472235.15.0.00627268510913.issue28100@psf.upfronthosting.co.za>
In-reply-to
Content
Here is the patch for 3.6 with requested changes.

While playing with this a bit more, I discovered that the error message in this case (if no value is actually assigned):

def f():
    x: int
    global x

could be misleading. Therefore I changed the order of DEF_LOCAL and DEF_ANNOT to get a more clear error message for such cases (this does not spoil error messages in other cases).
History
Date User Action Args
2016-09-21 15:37:15levkivskyisetrecipients: + levkivskyi, christian.heimes
2016-09-21 15:37:15levkivskyisetmessageid: <1474472235.15.0.00627268510913.issue28100@psf.upfronthosting.co.za>
2016-09-21 15:37:15levkivskyilinkissue28100 messages
2016-09-21 15:37:15levkivskyicreate