This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: print statements
ClosedPublic

Authored by hubert.reinterpretcast on Sep 12 2019, 8:41 PM.

Details

Summary

This patch applies 2to3 -f print fixes, corrects the indentation mangled by 2to3 for multiline print statements, and adds from __future__ import print_function to each file that was modified. As requested on review, spaces are then added after commas separating arguments to print, separating function call arguments or tuple elements within arguments to print, etc.

The changes cover the files found to be affected when running tests (without result submission).

Diff Detail

Repository
rL LLVM

Event Timeline

Could you take advantage of the change to consistently have a whitespace between comma and the next argument?

BTW thanks for working on this, I was working myself on a patch series to port LNT to python3, in the process of cleaning up that said patch series.

cmatthews accepted this revision.Sep 13 2019, 10:32 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Sep 13 2019, 10:32 AM

Could you take advantage of the change to consistently have a whitespace between comma and the next argument?

I'll commit this with the requested whitespace change.

Add spaces after commas in calls to print

Spaces are added after commas separating arguments to print, separating function call arguments or tuple elements within arguments to print, etc.

  • Handle one more case of missing space after comma
hubert.reinterpretcast edited the summary of this revision. (Show Details)Sep 13 2019, 12:57 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2019, 1:22 PM