Mercurial > cpython-lru_cache-weakref
diff Lib/idlelib/PyShell.py @ 18586:fe44428f9774 legacy-trunk
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
| author | Kurt B. Kaiser <kbk@shore.net> |
|---|---|
| date | Sat, 14 Jul 2001 05:10:34 +0000 |
| parents | 12e7ad108229 |
| children | 6238a222b7cd |
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py Sat Jul 14 04:59:24 2001 +0000 +++ b/Lib/idlelib/PyShell.py Sat Jul 14 05:10:34 2001 +0000 @@ -440,7 +440,7 @@ if self.reading: self.top.quit() return "cancel" - return PyShellEditorWindow.close(self) + return OutputWindow.close(self) def _close(self): self.close_debugger()
