This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients cheryl.sabella, terry.reedy
Date 2017-05-28.20:29:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I believe you said elsewhere that you would like to try the refactoring that splits a window+frame class into a window class and a frame class. It would be great if you became good at doing this.

If the current class name is used externally, I might consider reusing it for the window class.  But since the external interface for textview is the two wrapper functions, 'TextView' is not used externally.

F:\dev\cpython\lib\idlelib\idle_test\ 3: Since all methods and functions create (or destroy) a TextViewer, which
F:\dev\cpython\lib\idlelib\idle_test\ 31: # If we call TextViewer or wrapper functions with defaults
F:\dev\cpython\lib\idlelib\idle_test\ 36: class TV(tv.TextViewer):  # Used in TextViewTest.
F:\dev\cpython\lib\idlelib\idle_test\ 73: # Call TextViewer with modal=False.
F:\dev\cpython\lib\idlelib\idle_test\ 88:         self.assertIsInstance(view, tv.TextViewer)
F:\dev\cpython\lib\idlelib\idle_test\ 93:         self.assertIsInstance(view, tv.TextViewer)
F:\dev\cpython\lib\idlelib\idle_test\ 113: # Call TextViewer with _utest=True.
F:\dev\cpython\lib\idlelib\ 895:             # XXX KBK 27Dec07 use TextViewer someday, but must work w/o subproc
F:\dev\cpython\lib\idlelib\ 11: class TextViewer(Toplevel):
F:\dev\cpython\lib\idlelib\ 78:     """Create TextViewer for given text.
F:\dev\cpython\lib\idlelib\ 87:     return TextViewer(parent, title, text, modal, _utest=_utest)
F:\dev\cpython\lib\idlelib\ 91:     """Create TextViewer for text in filename.
F:\dev\cpython\lib\idlelib\ 116:     run(TextViewer)

So lets try TextviewWindow and TextviewFrame.  Make the obvious substitutions, except in the PyShell and line 78 and 91 comments, 'TextViewer' should become a generic 'text viewer' that would apply to TextviewFrame if that became the main entry point.

If you want to show me an incomplete patch, you can still upload diffs here.
Date User Action Args
2017-05-28 20:29:31terry.reedysetrecipients: + terry.reedy, cheryl.sabella
2017-05-28 20:29:31terry.reedysetmessageid: <>
2017-05-28 20:29:31terry.reedylinkissue30495 messages
2017-05-28 20:29:30terry.reedycreate