Issue #13 resolved

`print(3, end=' ')` isn't translated properly

Trent Mick
created an issue

Currently this

{{{ print(3, end=' ') }}}

becomes this:

{{{ import sys print 3,; sys.stdout.write(u' ') }}}

but I'd expect this:

{{{ print 3, }}}

Comments (4)

  1. Joe Amenta repo owner

    In, 2to3 is the one that gets it wrong. Writing an empty string to the output stream causes the trailing comma not to add a space, and 3to2 takes advantage of that to keep the print syntax relatively unchanged and just touch the immediate surroundings.

    As for it looks like I forgot to account for unicode (or bytes) literal endings... fixed in r188

  2. Log in to comment