add module-level constants to __all__
This commit is contained in:
parent
0b1f1b5145
commit
23bafc6fcd
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue