Author levkivskyi
Recipients docs@python, levkivskyi, ncoghlan, steven.daprano
Date 2017-03-18.13:39:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489844346.41.0.468987184655.issue24796@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like it is safe to just remove this line from docs. This code

>>> x = 1
>>> def f():
...     global x
...     del x
... 
>>> f()
>>> x

Works as expected, i.e. raises NameError. (The same happens for nonlocal but with UnboundLocalError.)
History
Date User Action Args
2017-03-18 13:39:06levkivskyisetrecipients: + levkivskyi, ncoghlan, steven.daprano, docs@python
2017-03-18 13:39:06levkivskyisetmessageid: <1489844346.41.0.468987184655.issue24796@psf.upfronthosting.co.za>
2017-03-18 13:39:06levkivskyilinkissue24796 messages
2017-03-18 13:39:06levkivskyicreate