[issue9254] __import__ docstring should recommend importlib.import_module()
July 13, 2010
11:24 p.m.
Éric Araujo <merwok@netwok.org> added the comment: More rationale for not using a dummy fromlist, from Brett Cannon: “Pulling from sys.modules is the correct way to do this. There are subtle issues when using a bunk fromlist argument (empty modules, double initialization, etc.). If one does not use importlib.import_module -- written *specifically* to prevent people from doing the nasty hack with the fromlist -- then you should use the sys.modules approach, period” ---------- nosy: +merwok _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue9254> _______________________________________
5814
Age (days ago)
5814
Last active (days ago)
0 comments
1 participants
participants (1)
-
Éric Araujo