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

Modernize Python 2 code to get ready for Python 3 #124

Closed
wants to merge 1 commit into from

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Dec 4, 2018

These changes do not break compatibility with Python 2. Related to #96

  • Use print() function in both Python 2 and Python 3
    • print() is a function in Python 3.
  • Old style exceptions --> new style for Python 3
    • Python 3 treats old style exceptions as syntax errors but new style exceptions work as expected in both Python 2 and Python 3.

* Use __print()__ function in both Python 2 and Python 3
    * __print()__ is a function in Python 3.
* Old style exceptions --> new style for Python 3
    * Python 3 treats old style exceptions as syntax errors but new style exceptions work as expected in both Python 2 and Python 3.
@nightpool
Copy link

nightpool commented Dec 5, 2018 via email

@cclauss cclauss closed this Feb 26, 2020
@cclauss cclauss deleted the modernize-Python-2-codes branch February 26, 2020 17:52
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.

2 participants