Learn how to migrate Python 2 codebases to Python 3 using Codegen
print
is a function rather than a statement, requiring
parentheses around its arguments.unicode
type and u
prefix
unnecessary.raw_input()
to input()
:
input()
function always returns a string, like Python 2’s
raw_input()
.as
instead of a comma to name the exception variable.next()
method to __next__()
for consistency with
other special methods.