summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 (GMT)
commitd91085598f5185b267ea51a3f615da9527af2ed2 (patch)
tree80849b9455438e9963a61d7aff3fc3b060213553 /Mac
parentfe55464f393fc002fd0911a4d8dba6694723d408 (diff)
downloadcpython-d91085598f5185b267ea51a3f615da9527af2ed2.zip
cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz
cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.bz2
Remove apply()
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Demo/sound/morse.py2
-rw-r--r--Mac/Tools/IDE/ProfileBrowser.py2
-rw-r--r--Mac/Tools/IDE/PyConsole.py2
-rw-r--r--Mac/Tools/IDE/PyDebugger.py4
-rw-r--r--Mac/Tools/IDE/Wapplication.py2
-rw-r--r--Mac/Tools/IDE/Wbase.py20
-rw-r--r--Mac/Tools/macfreeze/macgen_bin.py2
-rw-r--r--Mac/scripts/buildpkg.py4
8 files changed, 19 insertions, 19 deletions
diff --git a/Mac/Demo/sound/morse.py b/Mac/Demo/sound/morse.py
index b26d554..79ec6f5 100644
--- a/Mac/Demo/sound/morse.py
+++ b/Mac/Demo/sound/morse.py
@@ -78,7 +78,7 @@ mkwave(OCTAVE)
class BufferedAudioDev:
def __init__(self, *args):
import audiodev
- self._base = apply(audiodev.AudioDev, args)
+ self._base = audiodev.AudioDev(*args)
self._buffer = []
self._filled = 0
self._addmethods(self._base, self._base.__class__)
diff --git a/Mac/Tools/IDE/ProfileBrowser.py b/Mac/Tools/IDE/ProfileBrowser.py
index a2dafdd..1056010 100644
--- a/Mac/Tools/IDE/ProfileBrowser.py
+++ b/Mac/Tools/IDE/ProfileBrowser.py
@@ -65,7 +65,7 @@ class ProfileBrowser:
def displaystats(self):
W.SetCursor('watch')
- apply(self.stats.sort_stats, self.sortkeys)
+ self.stats.sort_stats(*self.sortkeys)
saveout = sys.stdout
try:
s = sys.stdout = StringIO.StringIO()
diff --git a/Mac/Tools/IDE/PyConsole.py b/Mac/Tools/IDE/PyConsole.py
index b8d6489..14312d5 100644
--- a/Mac/Tools/IDE/PyConsole.py
+++ b/Mac/Tools/IDE/PyConsole.py
@@ -26,7 +26,7 @@ def inspect(foo): # JJS 1/25/99
class ConsoleTextWidget(W.EditText):
def __init__(self, *args, **kwargs):
- apply(W.EditText.__init__, (self,) + args, kwargs)
+ W.EditText.__init__(self, *args, **kwargs)
self._inputstart = 0
self._buf = ''
self.pyinteractive = PyInteractive.PyInteractive()
diff --git a/Mac/Tools/IDE/PyDebugger.py b/Mac/Tools/IDE/PyDebugger.py
index 7fbc0f0..55f0d74 100644
--- a/Mac/Tools/IDE/PyDebugger.py
+++ b/Mac/Tools/IDE/PyDebugger.py
@@ -652,7 +652,7 @@ class Debugger(bdb.Bdb):
class SourceViewer(W.PyEditor):
def __init__(self, *args, **kwargs):
- apply(W.PyEditor.__init__, (self,) + args, kwargs)
+ W.PyEditor.__init__(self, *args, **kwargs)
self.bind('<click>', self.clickintercept)
def clickintercept(self, point, modifiers):
@@ -815,7 +815,7 @@ class BreakpointsViewer:
class TracingMonitor(W.Widget):
def __init__(self, *args, **kwargs):
- apply(W.Widget.__init__, (self,) + args, kwargs)
+ W.Widget.__init__(self, *args, **kwargs)
self.state = 0
def toggle(self):
diff --git a/Mac/Tools/IDE/Wapplication.py b/Mac/Tools/IDE/Wapplication.py
index 4cfc77b..0869269 100644
--- a/Mac/Tools/IDE/Wapplication.py
+++ b/Mac/Tools/IDE/Wapplication.py
@@ -129,7 +129,7 @@ class Application(FrameWork.Application):
window = self._windows[wid]
if hasattr(window, attr):
handler = getattr(window, attr)
- apply(handler, args)
+ handler(*args)
return 1
def getfrontwindow(self):
diff --git a/Mac/Tools/IDE/Wbase.py b/Mac/Tools/IDE/Wbase.py
index 93e499f..606b237 100644
--- a/Mac/Tools/IDE/Wbase.py
+++ b/Mac/Tools/IDE/Wbase.py
@@ -78,7 +78,7 @@ class Widget:
if type(args[0]) == FunctionType or type(args[0]) == MethodType:
self._possize = args[0]
else:
- apply(self.resize, args[0])
+ self.resize(*args[0])
elif len(args) == 2:
self._possize = (0, 0) + args
elif len(args) == 4:
@@ -175,37 +175,37 @@ class Widget:
def forall(self, methodname, *args):
for w in self._widgets:
- rv = apply(w.forall, (methodname,) + args)
+ rv = w.forall(methodname, *args)
if rv:
return rv
if self._bindings.has_key("<" + methodname + ">"):
callback = self._bindings["<" + methodname + ">"]
- rv = apply(callback, args)
+ rv = callback(*args)
if rv:
return rv
if hasattr(self, methodname):
method = getattr(self, methodname)
- return apply(method, args)
+ return method(*args)
def forall_butself(self, methodname, *args):
for w in self._widgets:
- rv = apply(w.forall, (methodname,) + args)
+ rv = w.forall(methodname, *args)
if rv:
return rv
def forall_frombottom(self, methodname, *args):
if self._bindings.has_key("<" + methodname + ">"):
callback = self._bindings["<" + methodname + ">"]
- rv = apply(callback, args)
+ rv = callback(*args)
if rv:
return rv
if hasattr(self, methodname):
method = getattr(self, methodname)
- rv = apply(method, args)
+ rv = method(*args)
if rv:
return rv
for w in self._widgets:
- rv = apply(w.forall_frombottom, (methodname,) + args)
+ rv = w.forall_frombottom(methodname, *args)
if rv:
return rv
@@ -670,7 +670,7 @@ def CallbackCall(callback, mustfit, *args):
maxargs = func.func_code.co_argcount - 1
else:
if callable(callback):
- return apply(callback, args)
+ return callback(*args)
else:
raise TypeError, "uncallable callback object"
@@ -679,7 +679,7 @@ def CallbackCall(callback, mustfit, *args):
else:
minargs = maxargs
if minargs <= len(args) <= maxargs:
- return apply(callback, args)
+ return callback(*args)
elif not mustfit and minargs == 0:
return callback()
else:
diff --git a/Mac/Tools/macfreeze/macgen_bin.py b/Mac/Tools/macfreeze/macgen_bin.py
index bfcdc8b..f52e37e 100644
--- a/Mac/Tools/macfreeze/macgen_bin.py
+++ b/Mac/Tools/macfreeze/macgen_bin.py
@@ -180,7 +180,7 @@ def copyres(input, output, *args, **kwargs):
output = Res.FSpOpenResFile(output, 3)
openedout = 1
try:
- apply(buildtools.copyres, (input, output) + args, kwargs)
+ buildtools.copyres(input, output, *args, **kwargs)
finally:
if openedin:
Res.CloseResFile(input)
diff --git a/Mac/scripts/buildpkg.py b/Mac/scripts/buildpkg.py
index 7f635a0..e6dc474 100644
--- a/Mac/scripts/buildpkg.py
+++ b/Mac/scripts/buildpkg.py
@@ -374,7 +374,7 @@ def buildPackage(*args, **options):
o = options
title, version, desc = o["Title"], o["Version"], o["Description"]
pm = PackageMaker(title, version, desc)
- apply(pm.build, list(args), options)
+ pm.build(*args, **options)
######################################################################
@@ -468,7 +468,7 @@ def main():
"Description" in ok):
print "Missing mandatory option!"
else:
- apply(buildPackage, args, optsDict)
+ buildPackage(*args, **optsDict)
return
printUsage()