Author: Ronny Pfannschmidt <[email protected]>
Branch: py3ksupport
Changeset: r145:007debcdb09f
Date: 2011-10-19 10:34 +0200
http://bitbucket.org/pypy/pyrepl/changeset/007debcdb09f/
Log: use unnamed argument expansion for passing event data to a command
diff --git a/pyrepl/commands.py b/pyrepl/commands.py
--- a/pyrepl/commands.py
+++ b/pyrepl/commands.py
@@ -33,10 +33,12 @@
class Command(object):
finish = 0
kills_digit_arg = 1
- def __init__(self, reader, (event_name, event)):
+
+ def __init__(self, reader, event_name, event):
self.reader = reader
self.event = event
self.event_name = event_name
+
def do(self):
pass
diff --git a/pyrepl/reader.py b/pyrepl/reader.py
--- a/pyrepl/reader.py
+++ b/pyrepl/reader.py
@@ -517,7 +517,7 @@
#print cmd
if isinstance(cmd[0], str):
cmd = self.commands.get(cmd[0],
- commands.invalid_command)(self, cmd)
+ commands.invalid_command)(self, *cmd)
elif isinstance(cmd[0], type):
cmd = cmd[0](self, cmd)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit