Message387401
> Regarding the text in What's New 3.10 about this at https://docs.python.org/dev/whatsnew/3.10.html#other-language-changes, I recommend adding there that func.__builtins__ is initialized from globals["__builtins__"], if it exists, else from the frame's builtins, when the function object is created; like you state in https://github.com/python/cpython/pull/24564.
Good idea, I updated my PR.
> Or perhaps make one of these paragraphs refer to the other for details, since they are duplicate mentions of the same behavior change (once the latter PR lands).
IMO it's useful to have two different paragraphs. One about the new attribute which is not really a semantics change, and one about the semantics changes when globals["__builtins__"] doesn't exist. For people who only care about Python 3.10 incompatible changes, they can simply read the Porting to Python 3.10 > Changes in the Python API section ;-) |
|
Date |
User |
Action |
Args |
2021-02-20 12:14:33 | vstinner | set | recipients:
+ vstinner, gvanrossum, brett.cannon, rhettinger, petr.viktorin, Mark.Shannon, serhiy.storchaka, yselivanov |
2021-02-20 12:14:33 | vstinner | set | messageid: <1613823273.49.0.304650831422.issue42990@roundup.psfhosted.org> |
2021-02-20 12:14:33 | vstinner | link | issue42990 messages |
2021-02-20 12:14:33 | vstinner | create | |
|