From 87c34803377fad1634dfd60a5e48c30a5d2ef4aa Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 20 Jun 2014 14:13:13 +0100 Subject: cli/pickle: Pass argument names. --- scripts/tracediff.py | 10 ++++++---- scripts/unpickle.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/tracediff.py b/scripts/tracediff.py index 22a26265..ed61e39d 100755 --- a/scripts/tracediff.py +++ b/scripts/tracediff.py @@ -341,14 +341,16 @@ class PythonDiffer(Differ): for j in xrange(numArgs): self.highlighter.write(sep) try: - a_arg = a_call.args[j] + a_argName, a_argVal = a_call.args[j] except IndexError: pass try: - b_arg = b_call.args[j] + b_argName, b_argVal = b_call.args[j] except IndexError: pass - self.replace_value(a_arg, b_arg) + self.replace_value(a_argName, b_argName) + self.highlighter.write(' = ') + self.replace_value(a_argVal, b_argVal) sep = ', ' self.highlighter.write(')') if a_call.ret is not None or b_call.ret is not None: @@ -449,7 +451,7 @@ class PythonDiffer(Differ): self.highlighter.bold(True) self.highlighter.write(call.functionName) self.highlighter.bold(False) - self.highlighter.write('(' + ', '.join(itertools.imap(self.dumper.visit, call.args)) + ')') + self.highlighter.write('(' + self.dumper.visitItems(call.args) + ')') if call.ret is not None: self.highlighter.write(' = ' + self.dumper.visit(call.ret)) self.highlighter.normal() diff --git a/scripts/unpickle.py b/scripts/unpickle.py index 1932497e..b6c76d10 100755 --- a/scripts/unpickle.py +++ b/scripts/unpickle.py @@ -208,7 +208,7 @@ class Call: if self.no is not None: s = str(self.no) + ' ' + s dumper = Dumper() - s += '(' + ', '.join(itertools.imap(dumper.visit, self.args)) + ')' + s += '(' + dumper.visitItems(self.args) + ')' if self.ret is not None: s += ' = ' s += dumper.visit(self.ret) -- cgit v1.2.3