From 663219a8cc0501791c45aa18986770c38c6430da Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 24 Jun 2003 20:19:34 +0000 Subject: [PATCH] _make_boundary(): A minor optimization suggested by the Timbot. --- Lib/email/Generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/email/Generator.py b/Lib/email/Generator.py index 6f17963d0f..3e578a2f74 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 -- 2.50.1