diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2001-07-14 05:10:34 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2001-07-14 05:10:34 (GMT) |
commit | bb6b1e9b26805af53e8758836343cf4b23d7f753 (patch) | |
tree | 28bc74080b291de657bbde3c3995f888288aaff5 /Lib/idlelib | |
parent | 752e4d55310655c22524e5d63319e18a1bf048b7 (diff) | |
download | cpython-bb6b1e9b26805af53e8758836343cf4b23d7f753.zip cpython-bb6b1e9b26805af53e8758836343cf4b23d7f753.tar.gz cpython-bb6b1e9b26805af53e8758836343cf4b23d7f753.tar.bz2 |
py-cvs-2001_07_13 (Rev 1.34) merge
"Amazing. A very subtle change in policy in descr-branch actually
found a bug here. Here's the deal: Class PyShell derives from class
OutputWindow. Method PyShell.close()
wants to invoke its parent method, but because PyShell long ago was
inherited from class PyShellEditorWindow, it invokes
PyShelEditorWindow.close(self). Now, class PyShellEditorWindow itself
derives from class OutputWindow, and inherits the close() method from
there without overriding it. Under the old rules,
PyShellEditorWindow.close would return an unbound method restricted to
the class that defined the implementation of close(), which was
OutputWindow.close. Under the new rules, the unbound method is
restricted to the class whose method was requested, that is
PyShellEditorWindow, and this was correctly trapped as an error." --GvR
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/PyShell.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index da827b8..399896a 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -440,7 +440,7 @@ class PyShell(OutputWindow): if self.reading: self.top.quit() return "cancel" - return PyShellEditorWindow.close(self) + return OutputWindow.close(self) def _close(self): self.close_debugger() |