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 diff --git a/setup.py b/setup.py index 42d02d4..b5a476d 100755 --- a/setup.py +++ b/setup.py @@ -274,6 +274,7 @@ if 'setuptools' in sys.modules: 'lib2to3.fixes.fix_has_key', 'lib2to3.fixes.fix_next', 'lib2to3.fixes.fix_repr', + 'lib2to3.fixes.fix_tuple_params', ] from setuptools.command.build_py import build_py setup_args['cmdclass'] = {'build_py': record_commit_info('IPython', build_cmd=build_py)}