_make_boundary(): A minor optimization suggested by the Timbot.
diff --git a/Lib/email/Generator.py b/Lib/email/Generator.py
index 6f17963..3e578a2 100644
--- a/Lib/email/Generator.py
+++ b/Lib/email/Generator.py
@@ -363,7 +363,7 @@
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