[issue27892] Idlelib: document or move delayed imports

2020-06-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Another good reason for delaying an import is when the import is only needed for testing. In module_x ... def callable_x(parent) # htest # from tkinter import Toplevel box = Toplevel(parent) ... if __name__ == '__main__': from unittest import m

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Consistently group and sort imports within idlelib modules. ___ Python tracker ___ ___

[issue27892] Idlelib: document or move delayed imports

2016-08-29 Thread Terry J. Reedy
New submission from Terry J. Reedy: This issue depends and follows-up on #27891, consistently grouping and sorting imports in idlelib files. PEP 8 (also) says 'all imports are put at the top of the file', though the 'consistency hobgloblin' rule allows for exceptions. Possible reasons include