diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 08:00:19 (GMT) |
commit | d91085598f5185b267ea51a3f615da9527af2ed2 (patch) | |
tree | 80849b9455438e9963a61d7aff3fc3b060213553 /Demo/pdist | |
parent | fe55464f393fc002fd0911a4d8dba6694723d408 (diff) | |
download | cpython-d91085598f5185b267ea51a3f615da9527af2ed2.zip cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.bz2 |
Remove apply()
Diffstat (limited to 'Demo/pdist')
-rwxr-xr-x | Demo/pdist/RCSProxy.py | 2 | ||||
-rwxr-xr-x | Demo/pdist/client.py | 5 | ||||
-rwxr-xr-x | Demo/pdist/server.py | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/Demo/pdist/RCSProxy.py b/Demo/pdist/RCSProxy.py index 87c65cc..ff3f0ce 100755 --- a/Demo/pdist/RCSProxy.py +++ b/Demo/pdist/RCSProxy.py @@ -186,7 +186,7 @@ def test(): if hasattr(proxy, what): attr = getattr(proxy, what) if callable(attr): - print apply(attr, tuple(sys.argv[2:])) + print attr(*sys.argv[2:]) else: print repr(attr) else: diff --git a/Demo/pdist/client.py b/Demo/pdist/client.py index 3e97d84..664c41b 100755 --- a/Demo/pdist/client.py +++ b/Demo/pdist/client.py @@ -132,12 +132,11 @@ from security import Security class SecureClient(Client, Security): def __init__(self, *args): - import string - apply(self._pre_init, args) + self._pre_init(*args) Security.__init__(self) self._wf.flush() line = self._rf.readline() - challenge = string.atoi(string.strip(line)) + challenge = int(line.strip()) response = self._encode_challenge(challenge) line = repr(long(response)) if line[-1] in 'Ll': line = line[:-1] diff --git a/Demo/pdist/server.py b/Demo/pdist/server.py index 01b3249..79afa8b 100755 --- a/Demo/pdist/server.py +++ b/Demo/pdist/server.py @@ -81,7 +81,7 @@ class Server: raise NameError, "illegal method name %s" % repr(methodname) else: method = getattr(self, methodname) - reply = (None, apply(method, args), id) + reply = (None, method(*args), id) except: reply = (sys.exc_info()[:2], id) if id < 0 and reply[:2] == (None, None): @@ -117,7 +117,7 @@ from security import Security class SecureServer(Server, Security): def __init__(self, *args): - apply(Server.__init__, (self,) + args) + Server.__init__(self, *args) Security.__init__(self) def _verify(self, conn, address): |