[Idle-dev] CVS: idle PyShell.py,1.3,1.4

Kurt B. Kaiser kbk@users.sourceforge.net
Fri, 13 Jul 2001 22:10:37 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv6665

Modified Files:
	PyShell.py 
Log Message:
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


Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** PyShell.py	2001/07/14 00:13:28	1.3
--- PyShell.py	2001/07/14 05:10:34	1.4
***************
*** 441,445 ****
                  self.top.quit()
              return "cancel"
!         return PyShellEditorWindow.close(self)
  
      def _close(self):
--- 441,445 ----
                  self.top.quit()
              return "cancel"
!         return OutputWindow.close(self)
  
      def _close(self):