Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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: 1 addition & 2 deletions Lib/pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import sys
from sys import maxsize
from struct import pack, unpack
import re
import io
import codecs
import _compat_pickle
Expand Down Expand Up @@ -188,7 +187,7 @@ def __init__(self, value):
NEXT_BUFFER = b'\x97' # push next out-of-band buffer
READONLY_BUFFER = b'\x98' # make top of stack readonly

__all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$", x)])
__all__.extend(x for x in dir() if x.isupper() and not x.startswith('_'))


class _Framer:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Improve import time of :mod:`pickle` by 25% by removing an un-necessary
import to :mod:`re`. Patch by Bénédikt Tran.
Loading