mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
fix bogus hasttr usage
This commit is contained in:
parent
2e0d2dd23a
commit
fefbbe5085
1 changed files with 2 additions and 2 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue