add module-level constants to __all__

This commit is contained in:
Skip Montanaro 2001-02-18 03:10:09 +00:00
parent 0b1f1b5145
commit 23bafc6fcd
1 changed files with 3 additions and 0 deletions

View File

@ -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):