summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-03-22 10:10:31 (GMT)
committerGuido van Rossum <guido@python.org>1995-03-22 10:10:31 (GMT)
commitfefbbe508582d6cd057e6e8e1be89607203076a9 (patch)
tree063bb8d621d41e97a435ebe0f230e74999c39fd7 /Lib
parent2e0d2dd23ae8173c94d485593b24b98c52b0d96a (diff)
downloadcpython-fefbbe508582d6cd057e6e8e1be89607203076a9.zip
cpython-fefbbe508582d6cd057e6e8e1be89607203076a9.tar.gz
cpython-fefbbe508582d6cd057e6e8e1be89607203076a9.tar.bz2
fix bogus hasttr usage
Diffstat (limited to 'Lib')
-rw-r--r--Lib/copy.py4
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():