Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/base64.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support
# Modified 22-May-2007 by Guido van Rossum to use bytes everywhere

import re
import struct
import binascii

Expand Down Expand Up @@ -281,6 +280,8 @@ def b16decode(s, casefold=False):
s is incorrectly padded or if there are non-alphabet characters present
in the input.
"""
import re

Comment thread
picnixz marked this conversation as resolved.
Resolved
s = _bytes_from_decode_data(s)
if casefold:
s = s.upper()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Improve import time of :mod:`base64` by a factor six. This is achieved by
importing :mod:`re` on demand. Patch by Bénédikt Tran.