summaryrefslogtreecommitdiff
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-27 20:14:51 +0000
committerGuido van Rossum <guido@python.org>2003-02-27 20:14:51 +0000
commit68468eba635570400f607e140425a222018e56f9 (patch)
tree2176c8822392383a88caa0a2209a1d2f3446d45c /Lib/copy.py
parentf389c7727362321a91dbaff13b7e1cef6cbaa3d8 (diff)
downloadcpython-git-68468eba635570400f607e140425a222018e56f9.tar.gz
Get rid of many apply() calls.
Diffstat (limited to 'Lib/copy.py')
-rw-r--r--Lib/copy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/copy.py b/Lib/copy.py
index 7b82adbeb2..a4a3cebd53 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -140,7 +140,7 @@ def _copy_inst(x):
return x.__copy__()
if hasattr(x, '__getinitargs__'):
args = x.__getinitargs__()
- y = apply(x.__class__, args)
+ y = x.__class__(*args)
else:
y = _EmptyClass()
y.__class__ = x.__class__
@@ -293,7 +293,7 @@ def _deepcopy_inst(x, memo):
if hasattr(x, '__getinitargs__'):
args = x.__getinitargs__()
args = deepcopy(args, memo)
- y = apply(x.__class__, args)
+ y = x.__class__(*args)
else:
y = _EmptyClass()
y.__class__ = x.__class__