[Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.9,1.10

Guido van Rossum python-dev@python.org
2000年4月28日 16:40:00 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Lib/test
In directory eric:/projects/python/develop/guido/src/Lib/test
Modified Files:
	test_unicode.py 
Log Message:
Get rid of memory leak caused by assingning sys.exc_info() to a local.
Store sys.exc_info()[:2] instead.
Index: test_unicode.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_unicode.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** test_unicode.py	2000年04月13日 14:11:56	1.9
--- test_unicode.py	2000年04月28日 20:39:58	1.10
***************
*** 17,21 ****
 except:
 value = sys.exc_type
! exc = sys.exc_info()
 else:
 exc = None
--- 17,21 ----
 except:
 value = sys.exc_type
! exc = sys.exc_info()[:2]
 else:
 exc = None
***************
*** 25,29 ****
 print '*',f, `input`, `output`, `value`
 if exc:
! print ' value == %s: %s' % (exc[:2])
 else:
 if verbose:
--- 25,29 ----
 print '*',f, `input`, `output`, `value`
 if exc:
! print ' value == %s: %s' % (exc)
 else:
 if verbose:

AltStyle によって変換されたページ (->オリジナル) /