diff options
author | Guido van Rossum <guido@python.org> | 2002-05-29 20:38:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-05-29 20:38:21 (GMT) |
commit | ca948b40b4fa16d9dca779d5d7f782a68c53b119 (patch) | |
tree | c835cfc631cdd66c2f5da288b8ca29acd9cb3710 | |
parent | 127ee1607f41da6a9f914c8de7c3638b6d6490cc (diff) | |
download | cpython-ca948b40b4fa16d9dca779d5d7f782a68c53b119.zip cpython-ca948b40b4fa16d9dca779d5d7f782a68c53b119.tar.gz cpython-ca948b40b4fa16d9dca779d5d7f782a68c53b119.tar.bz2 |
Use floor division where appropriate.
-rw-r--r-- | Lib/email/base64MIME.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/base64MIME.py b/Lib/email/base64MIME.py index 11979e3..aada22d 100644 --- a/Lib/email/base64MIME.py +++ b/Lib/email/base64MIME.py @@ -87,7 +87,7 @@ def header_encode(header, charset='iso-8859-1', keep_eols=0, maxlinelen=76, # length, after the RFC chrome is added in. base64ed = [] max_encoded = maxlinelen - len(charset) - MISC_LEN - max_unencoded = max_encoded * 3 / 4 + max_unencoded = max_encoded * 3 // 4 # BAW: Ben's original code used a step of max_unencoded, but I think it # ought to be max_encoded. Otherwise, where's max_encoded used? I'm @@ -131,7 +131,7 @@ def encode(s, binary=1, maxlinelen=76, eol=NL): s = fix_eols(s) encvec = [] - max_unencoded = maxlinelen * 3 / 4 + max_unencoded = maxlinelen * 3 // 4 for i in range(0, len(s), max_unencoded): # BAW: should encode() inherit b2a_base64()'s dubious behavior in # adding a newline to the encoded string? |