From fefbbe508582d6cd057e6e8e1be89607203076a9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 22 Mar 1995 10:10:31 +0000 Subject: fix bogus hasttr usage --- Lib/copy.py | 4 ++-- 1 file 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(): -- cgit v0.12