diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 3824e90..1228a2e 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -1205,7 +1205,8 @@ class SyntaxTB(ListTB): #---------------------------------------------------------------------------- # module testing (minimal) if __name__ == "__main__": - def spam(c, (d, e)): + def spam(c, d_e): + (d, e) = d_e x = c + d y = c * d foo(x, y) diff --git a/IPython/utils/PyColorize.py b/IPython/utils/PyColorize.py index f1e7369..c4baace 100644 --- a/IPython/utils/PyColorize.py +++ b/IPython/utils/PyColorize.py @@ -204,10 +204,10 @@ class Parser: return (output, error) return (None, error) - def __call__(self, toktype, toktext, (srow,scol), (erow,ecol), line): + def __call__(self, toktype, toktext, start_pos, end_pos, line): """ Token handler, with syntax highlighting.""" - - # local shorthands + (srow,scol) = start_pos + (erow,ecol) = end_pos colors = self.colors owrite = self.out.write