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 jfine2358
Recipients docs@python, jfine2358
Date 2018-08-18.16:03:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za>
In-reply-to
Content
See https://docs.python.org/3.6/library/functions.html#eval
This says the following won't happen. But it does.

Python 3.6.2 (default, Jul 29 2017, 00:00:00) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def fn(): print(3); return 4
... 
>>> eval(fn.__code__)
3
4

Compare with https://docs.python.org/3.6/library/functions.html#exec

Search for eval in title of open issues bring up related

#22057 (The doc say all globals are copied on eval(), but only __builtins__ is copied)
#25810 (Python 3 documentation for eval is incorrect)
History
Date User Action Args
2018-08-18 16:03:19jfine2358setrecipients: + jfine2358, docs@python
2018-08-18 16:03:19jfine2358setmessageid: <1534608199.83.0.56676864532.issue34431@psf.upfronthosting.co.za>
2018-08-18 16:03:19jfine2358linkissue34431 messages
2018-08-18 16:03:19jfine2358create