Issue #17 resolved

print fixer does not handle argument unpacking

Joe Amenta
repo owner created an issue

In a print function, one might do something like: {{{

!python

def error_out(args): print(args, file=sys.stderr) }}}

This needs to be changed to something like:

{{{

!python

def error_out(*args): for arg in args: print >>sys.stderr, arg, print }}}

Alternatively: {{{

!python

from future import print_function

def error_out(args): for arg in args: print(args, file=sys.stderr) }}}

I'm leaning towards the second one.

Comments (1)

  1. Log in to comment