[Python-checkins] python/dist/src/Lib/email Generator.py,1.20,1.21

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
2003年6月24日 13:19:36 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv1629
Modified Files:
	Generator.py 
Log Message:
_make_boundary(): A minor optimization suggested by the Timbot.
Index: Generator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Generator.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Generator.py	29 May 2003 19:39:33 -0000	1.20
--- Generator.py	24 Jun 2003 20:19:34 -0000	1.21
***************
*** 364,368 ****
 # Craft a random boundary. If text is given, ensure that the chosen
 # boundary doesn't appear in the text.
! token = random.randint(0, sys.maxint-1)
 boundary = ('=' * 15) + (_fmt % token) + '=='
 if text is None:
--- 364,368 ----
 # Craft a random boundary. If text is given, ensure that the chosen
 # boundary doesn't appear in the text.
! token = random.randrange(sys.maxint)
 boundary = ('=' * 15) + (_fmt % token) + '=='
 if text is None:

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