[Python-checkins] python/dist/src/Lib doctest.py,1.51,1.52

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Mon Aug 9 06:12:38 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16064/Lib

Modified Files:
	doctest.py 
Log Message:
Repair some out-of-date comments.


Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** doctest.py	9 Aug 2004 03:51:46 -0000	1.51
--- doctest.py	9 Aug 2004 04:12:36 -0000	1.52
***************
*** 1280,1287 ****
              # keyboard interrupts.)
              try:
!                 # If the example is a compound statement on one line,
!                 # like "if 1: print 2", then compile() requires a
!                 # trailing newline.  Rather than analyze that, always
!                 # append one (it never hurts).
                  exec compile(example.source, "<string>", "single",
                               compileflags, 1) in test.globs
--- 1280,1284 ----
              # keyboard interrupts.)
              try:
!                 # Don't blink!  This is where the user's code gets run.
                  exec compile(example.source, "<string>", "single",
                               compileflags, 1) in test.globs
***************
*** 1292,1299 ****
                  exception = sys.exc_info()
  
!             # Extract the example's actual output from fakeout, and
!             # write it to `got`.  Add a terminating newline if it
!             # doesn't have already one.
!             got = self._fakeout.getvalue()
              self._fakeout.truncate(0)
  
--- 1289,1293 ----
                  exception = sys.exc_info()
  
!             got = self._fakeout.getvalue()  # the actual output
              self._fakeout.truncate(0)
  



More information about the Python-checkins mailing list