diff options
author | Guido van Rossum <guido@python.org> | 1995-03-22 10:10:31 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-03-22 10:10:31 (GMT) |
commit | fefbbe508582d6cd057e6e8e1be89607203076a9 (patch) | |
tree | 063bb8d621d41e97a435ebe0f230e74999c39fd7 /Lib | |
parent | 2e0d2dd23ae8173c94d485593b24b98c52b0d96a (diff) | |
download | cpython-fefbbe508582d6cd057e6e8e1be89607203076a9.zip cpython-fefbbe508582d6cd057e6e8e1be89607203076a9.tar.gz cpython-fefbbe508582d6cd057e6e8e1be89607203076a9.tar.bz2 |
fix bogus hasttr usage
Diffstat (limited to 'Lib')
-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 3bbf3e7..a48e8c8 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -115,7 +115,7 @@ def _copy_inst(x): state = x.__getstate__() else: state = x.__dict__ - if y.hasattr('__setstate__'): + if hasattr(y, '__setstate__'): y.__setstate__(state) else: for key in state.keys(): @@ -209,7 +209,7 @@ def _deepcopy_inst(x, memo): else: state = x.__dict__ state = deepcopy(state, memo) - if y.hasattr('__setstate__'): + if hasattr(y, '__setstate__'): y.__setstate__(state) else: for key in state.keys(): |