diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 16:06:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-24 16:06:42 (GMT) |
commit | 32af7549a7cf8f112c44526a28afa6c99e67269c (patch) | |
tree | 0984789f4a78bf02a3ed3713dc115116bfe24e2b /Lib/copy.py | |
parent | 944fbcc478e36523add77574e172caf518647c74 (diff) | |
download | cpython-32af7549a7cf8f112c44526a28afa6c99e67269c.zip cpython-32af7549a7cf8f112c44526a28afa6c99e67269c.tar.gz cpython-32af7549a7cf8f112c44526a28afa6c99e67269c.tar.bz2 |
Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
Diffstat (limited to 'Lib/copy.py')
-rw-r--r-- | Lib/copy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/copy.py b/Lib/copy.py index 383609b..3a45fdf 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -94,7 +94,7 @@ def copy(x): else: reductor = getattr(x, "__reduce_ex__", None) if reductor: - rv = reductor(2) + rv = reductor(4) else: reductor = getattr(x, "__reduce__", None) if reductor: @@ -171,7 +171,7 @@ def deepcopy(x, memo=None, _nil=[]): else: reductor = getattr(x, "__reduce_ex__", None) if reductor: - rv = reductor(2) + rv = reductor(4) else: reductor = getattr(x, "__reduce__", None) if reductor: |