commit | 2329eeda0cabfda89e915e9a571a229707602963 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Mon Nov 30 17:20:02 2015 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Mon Nov 30 17:20:02 2015 +0200 |
tree | bf58923c33a7c8a3f6d71aa8424539a497383912 | |
parent | 03f3c2fa5f7c9b5a178f7af842411a92f5c93791 [diff] [blame] |
Issue #25718: Fixed copying object with state with boolean value is false.
diff --git a/Lib/copy.py b/Lib/copy.py index c227a2e..daf81a3 100644 --- a/Lib/copy.py +++ b/Lib/copy.py
@@ -315,7 +315,7 @@ if n > 2: state = info[2] else: - state = {} + state = None if n > 3: listiter = info[3] else: @@ -329,7 +329,7 @@ y = callable(*args) memo[id(x)] = y - if state: + if state is not None: if deep: state = deepcopy(state, memo) if hasattr(y, '__setstate__'):