New submission from Terry J. Reedy:

PEP 8 suggests separately grouping stdlib, dependency, and local package 
imports.  Within idlelib, idlelib imports are treated as local package imports. 
 Tkinter is sometimes treated as a dependency, which makes its imports easy to 
notice, and I want to do this consistently.  It is conventional to sort imports 
within each group.  This is sometimes true now, sometimes not (even before the 
3.6 renaming).

The possible danger of rearranging imports is that a line gets deleted and not 
pasted.  Rietveld's side-by-side diff should make this easy to detect.

This issue is about re-arranging the imports currently at the top of a file, 
and any module level imports that I notice elsewhere.  Dealing with delayed 
imports within functions and classed will be another issue, which will depend 
on this one.

----------
assignee: terry.reedy
components: IDLE
messages: 273892
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Consistently group and sort imports within idlelib modules.
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to