Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
most complete compatibility by using the __all__ from the imported mo…
…dules
- Loading branch information
Showing
2 changed files
with
4 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,7 @@ | ||
import sys | ||
|
||
__all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler", | ||
"Unpickler", "dump", "dumps", "load", "loads"] | ||
|
||
if sys.version_info[0] >= 3: | ||
from .pickle_3 import ( | ||
PickleError, | ||
PicklingError, | ||
UnpicklingError, | ||
Pickler, | ||
Unpickler, | ||
dump, | ||
dumps, | ||
load, | ||
loads, | ||
# needed by pickletester | ||
bytes_types | ||
) | ||
from .pickle_3 import * | ||
else: | ||
from .pickle_2 import ( | ||
PickleError, | ||
PicklingError, | ||
UnpicklingError, | ||
Pickler, | ||
Unpickler, | ||
dump, | ||
dumps, | ||
load, | ||
loads, | ||
) | ||
from .pickle_2 import * | ||
del sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters