mirror of
https://github.com/python/cpython.git
synced 2025-09-03 23:41:18 +00:00
add module-level constants to __all__
This commit is contained in:
parent
0b1f1b5145
commit
23bafc6fcd
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,7 @@ from copy_reg import dispatch_table, safe_constructors
|
||||||
import marshal
|
import marshal
|
||||||
import sys
|
import sys
|
||||||
import struct
|
import struct
|
||||||
|
import re
|
||||||
|
|
||||||
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
|
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
|
||||||
"Unpickler", "dump", "dumps", "load", "loads"]
|
"Unpickler", "dump", "dumps", "load", "loads"]
|
||||||
|
@ -95,6 +96,8 @@ EMPTY_TUPLE = ')'
|
||||||
SETITEMS = 'u'
|
SETITEMS = 'u'
|
||||||
BINFLOAT = 'G'
|
BINFLOAT = 'G'
|
||||||
|
|
||||||
|
__all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$",x)])
|
||||||
|
|
||||||
class Pickler:
|
class Pickler:
|
||||||
|
|
||||||
def __init__(self, file, bin = 0):
|
def __init__(self, file, bin = 0):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue