You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
The text was updated successfully, but these errors were encountered:
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:
print
print 'abc'
print('abc')
We can import
from __future__ import print_function
at the beginning of codes which useprint
statement and reviseprint
in Py 3 style, then the code will work in both Py 2 and 3 env.We need to make sure the code does what we want.
The text was updated successfully, but these errors were encountered: