Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ca948b40
Commit
ca948b40
authored
May 29, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use floor division where appropriate.
parent
127ee160
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/email/base64MIME.py
Lib/email/base64MIME.py
+2
-2
No files found.
Lib/email/base64MIME.py
View file @
ca948b40
...
@@ -87,7 +87,7 @@ def header_encode(header, charset='iso-8859-1', keep_eols=0, maxlinelen=76,
...
@@ -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.
# length, after the RFC chrome is added in.
base64ed
=
[]
base64ed
=
[]
max_encoded
=
maxlinelen
-
len
(
charset
)
-
MISC_LEN
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
# 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
# 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):
...
@@ -131,7 +131,7 @@ def encode(s, binary=1, maxlinelen=76, eol=NL):
s
=
fix_eols
(
s
)
s
=
fix_eols
(
s
)
encvec
=
[]
encvec
=
[]
max_unencoded
=
maxlinelen
*
3
/
4
max_unencoded
=
maxlinelen
*
3
/
/
4
for
i
in
range
(
0
,
len
(
s
),
max_unencoded
):
for
i
in
range
(
0
,
len
(
s
),
max_unencoded
):
# BAW: should encode() inherit b2a_base64()'s dubious behavior in
# BAW: should encode() inherit b2a_base64()'s dubious behavior in
# adding a newline to the encoded string?
# adding a newline to the encoded string?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment