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

Consideration of Python 3 environment #25

Open
lee1043 opened this issue Dec 12, 2018 · 0 comments
Open

Consideration of Python 3 environment #25

lee1043 opened this issue Dec 12, 2018 · 0 comments

Comments

@lee1043
Copy link
Collaborator

lee1043 commented Dec 12, 2018

Current version of the code works in the Python 2 environment but not considering the Python 3 environment. Most recent version of cdms has moved toward Python 3 env.

Major differences are:

  1. usage of print
  • Py 2: print 'abc'
  • Py 3: print('abc')

We can import from __future__ import print_function at the beginning of codes which use print statement and revise print in Py 3 style, then the code will work in both Py 2 and 3 env.

  1. integer divided by integer
  • Py 2: int/int = int
  • Py 3: int/int = float

We need to make sure the code does what we want.

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

No branches or pull requests

1 participant