[Python-checkins] CVS: python/dist/src/Lib doctest.py,1.13,1.14

Tim Peters tim_one@users.sourceforge.net
Sun, 24 Jun 2001 13:24:18 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv10488/Lib

Modified Files:
	doctest.py 
Log Message:
Changed some comments.  Removed the caution about clearing globs, since
clearing a shallow copy _run_examples() makes itself can't hurt anything.


Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** doctest.py	2001/06/24 20:02:47	1.13
--- doctest.py	2001/06/24 20:24:16	1.14
***************
*** 532,537 ****
  # Run list of examples, in a shallow copy of context (dict) globs.
  # Return (#failures, #tries).
- # CAUTION:  globs is cleared before returning.  This is to help break
- # cycles that may have been created by the examples.
  
  def _run_examples(examples, globs, verbose, name):
--- 532,535 ----
***************
*** 550,554 ****
          # iterator gets an entry in globs, and the generator-iterator
          # object's frame's traceback info points back to globs.  This is
!         # easy to break just by clearing the namespace.
          globs.clear()
      return x
--- 548,554 ----
          # iterator gets an entry in globs, and the generator-iterator
          # object's frame's traceback info points back to globs.  This is
!         # easy to break just by clearing the namespace.  This can also
!         # help to break other kinds of cycles, and even for cycles that
!         # gc can break itself it's better to break them ASAP.
          globs.clear()
      return x