◐ Shell
clean mode source ↗

Message 100194 - Python tracker

According to http://docs.python.org/reference/simple_stmts.html#the-print-statement the following with result in the print statement NOT printing a trailing space:

    import sys
    print u"ASD",; sys.stdout.write(u"")

However, 2to3 currently translates this to:

    import sys
    print("ASD", end=' '); sys.stdout.write("")

It *should* translate to:

    import sys
    print("ASD", end='')

You can also see the discussion of this on this lib3to2 bug report:
  http://bitbucket.org/amentajo/lib3to2/issue/13/print-3-end-isnt-translated-properly
and translation of this between 2to3 and 3to2 here:
  http://pythontranslationparty.appspot.com/6004/