Message383271
> Modules are already cleared in the reverse order.
In Python 3.9, _PyImport_Cleanup() of Python/import.c contains the comment:
/* Since dict is ordered in CPython 3.6+, modules are saved in
importing order. First clear modules imported later. */
But using Python 3.9, the z.py example output is:
---
a
b
c
---
The most recently imported module is the last one to be deleted.
The first loop iterates on sys.modules, not on reversed(sys.modules). |
|
Date |
User |
Action |
Args |
2020-12-17 22:05:48 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka |
2020-12-17 22:05:48 | vstinner | set | messageid: <1608242748.14.0.0960707187925.issue42671@roundup.psfhosted.org> |
2020-12-17 22:05:48 | vstinner | link | issue42671 messages |
2020-12-17 22:05:48 | vstinner | create | |
|