Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate script from Python2 to Python3 #14

Closed
wants to merge 1 commit into from
Closed

Migrate script from Python2 to Python3 #14

wants to merge 1 commit into from

Conversation

eribertomota
Copy link

Made with a little help of 2to3 script. This patch is from Debian.

 Made with a little help of 2to3 script. This patch is from Debian.
@samueltardieu
Copy link
Owner

The script is already compatible with Python 3. The two main parts of this patch are useless:

  • There is no need to have two pairs or parentheses around print() argument.
  • There is no need to build an intermediate list from an iterator just to iterate over the list.

If this patch is really in Debian, you should consider telling them to remove it, they can keep the first line if their Python is still Python 2 by default (Python 3 has been released for 11 years already…).

@eribertomota
Copy link
Author

No problem to use your original script in Debian. I only need to change the first line to python3. However, I did some tests and this script seems not work.

bors bot added a commit that referenced this pull request Jan 5, 2020
15: Make remove-duplicates behaviour reproducible and add test r=samueltardieu a=samueltardieu

Follows remark in #14.

Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
bors bot added a commit that referenced this pull request Jan 5, 2020
15: Make remove-duplicates behaviour reproducible and add test r=samueltardieu a=samueltardieu

Follows remark in #14.

Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
bors bot added a commit that referenced this pull request Jan 5, 2020
15: Make remove-duplicates behaviour reproducible and add test r=samueltardieu a=samueltardieu

Follows remark in #14.

Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants