Terry J. Reedy added the comment:

I have a new idea for public interfaces: keep most of idlelib private and add a 
new 'interface' module containing public interfaces.  It could be backported to 
3.5 and even 2.7.

This was prompted by working with turtledemo.  It currently imports textview, 
percolator, and colorizer to create a colorized code viewer.  At the moment, 
changing the names in the three imports worked, but that could change if any of 
the files are refactored.  (And what about people who have trouble hooking the 
three components together correctly?)

Instead, lets create, say, class ColorCodeview (or maybe a function) in 
interface and have turtledemo do one import, say 'from idlelib.interface import 
ColorCodeview'.  The internal code code would be slilghtly different in each of 
2.7, 3.5, and 3.6 (and maybe different again sometime after the initial 
commit).  But the import and basic use should be the same.

The only thing I might put in the main idlelib doc would be something like 'See 
the interface module for currently supported external uses of idlelib 
components."

----------

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

Reply via email to