diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-30 15:20:02 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-30 15:20:02 (GMT) |
commit | cbbec1c53f4b6fb88b4ae984e69db2d2951cd560 (patch) | |
tree | dbeedc92a40ef0f47f106cdae19d0aab55dbd83a /Lib/copy.py | |
parent | 7279befccbd49fc6aa2f96c4b0dea1799695156d (diff) | |
download | cpython-cbbec1c53f4b6fb88b4ae984e69db2d2951cd560.zip cpython-cbbec1c53f4b6fb88b4ae984e69db2d2951cd560.tar.gz cpython-cbbec1c53f4b6fb88b4ae984e69db2d2951cd560.tar.bz2 |
Issue #25718: Fixed copying object with state with boolean value is false.
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 bb8840e..f0fb443 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -281,7 +281,7 @@ def _reconstruct(x, info, deep, memo=None): if n > 2: state = info[2] else: - state = {} + state = None if n > 3: listiter = info[3] else: @@ -295,7 +295,7 @@ def _reconstruct(x, info, deep, memo=None): y = callable(*args) memo[id(x)] = y - if state: + if state is not None: if deep: state = deepcopy(state, memo) if hasattr(y, '__setstate__'): |