From: Barry Warsaw Date: Tue, 24 Jun 2003 20:19:34 +0000 (+0000) Subject: _make_boundary(): A minor optimization suggested by the Timbot. X-Git-Tag: v2.3c1~335 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=663219a8cc0501791c45aa18986770c38c6430da;p=thirdparty%2FPython%2Fcpython.git _make_boundary(): A minor optimization suggested by the Timbot. --- diff --git a/Lib/email/Generator.py b/Lib/email/Generator.py index 6f17963d0f18..3e578a2f745b 100644 --- a/Lib/email/Generator.py +++ b/Lib/email/Generator.py @@ -363,7 +363,7 @@ _fmt = '%%0%dd' % _width def _make_boundary(text=None): # 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) + token = random.randrange(sys.maxint) boundary = ('=' * 15) + (_fmt % token) + '==' if text is None: return boundary