summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2001-02-18 03:10:09 (GMT)
committerSkip Montanaro <skip@pobox.com>2001-02-18 03:10:09 (GMT)
commit23bafc6fcdd918fb696d230a10b3ef992d17309b (patch)
tree8aeb4fcbdb24f28e543fee3e841ed8543710d431 /Lib/pickle.py
parent0b1f1b514524c4ee13e59e3695a4a06c6be119d1 (diff)
downloadcpython-23bafc6fcdd918fb696d230a10b3ef992d17309b.zip
cpython-23bafc6fcdd918fb696d230a10b3ef992d17309b.tar.gz
cpython-23bafc6fcdd918fb696d230a10b3ef992d17309b.tar.bz2
add module-level constants to __all__
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 5606ee0..dc4c3eb 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -30,6 +30,7 @@ from copy_reg import dispatch_table, safe_constructors
import marshal
import sys
import struct
+import re
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
"Unpickler", "dump", "dumps", "load", "loads"]
@@ -95,6 +96,8 @@ EMPTY_TUPLE = ')'
SETITEMS = 'u'
BINFLOAT = 'G'
+__all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$",x)])
+
class Pickler:
def __init__(self, file, bin = 0):