summaryrefslogtreecommitdiff
path: root/Mac/Tools
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 +0000
commitd91085598f5185b267ea51a3f615da9527af2ed2 (patch)
tree80849b9455438e9963a61d7aff3fc3b060213553 /Mac/Tools
parentfe55464f393fc002fd0911a4d8dba6694723d408 (diff)
downloadcpython-git-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz
Remove apply()
Diffstat (limited to 'Mac/Tools')
-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
6 files changed, 16 insertions, 16 deletions
diff --git a/Mac/Tools/IDE/ProfileBrowser.py b/Mac/Tools/IDE/ProfileBrowser.py
index a2dafddfe1..10560104a3 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 b8d6489487..14312d5f3f 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 7fbc0f0f0a..55f0d743a6 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 4cfc77b8f9..08692696e8 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 93e499f7dc..606b2376af 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 bfcdc8b29b..f52e37e4f7 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)