diff options
author | Barry Warsaw <barry@python.org> | 2003-06-24 20:19:34 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-06-24 20:19:34 (GMT) |
commit | 663219a8cc0501791c45aa18986770c38c6430da (patch) | |
tree | 73e7d4df004d76e4dc9844adbd99c3227e3ac015 | |
parent | 616a58d79af2ae34430548156cfa7b44c55c700a (diff) | |
download | cpython-663219a8cc0501791c45aa18986770c38c6430da.zip cpython-663219a8cc0501791c45aa18986770c38c6430da.tar.gz cpython-663219a8cc0501791c45aa18986770c38c6430da.tar.bz2 |
_make_boundary(): A minor optimization suggested by the Timbot.
-rw-r--r-- | Lib/email/Generator.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ _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 |