2to3print statementhas_key() dictionary methodfilter() global functionmap() global functionapply() global functionintern() global functionexec statementrepr literals (backticks)try...except statementraise statementthrow statementlong data typexrange() global functionraw_input() global functioninput() global methodfunc_* function attributesxreadlines() I/O methodlambda functions with multiple parameters__class__ special class attributenext() iterator method__nonzero__ special class attributesys.maxintunicode() global functioncallable() global functionzip() global functionStandardError() exceptiontypes module constantsbasestring datatypeitertools modulesys.exc_type, sys.exc_value, sys.exc_tracebackos.getcwdu() functionset() literalsbuffer() global functionFIXME intro
...
print statementFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | print |
print() |
| ② | print 1 |
print(1) |
| ③ | print 1, 2 |
print(1, 2) |
| ④ | print 1, 2, |
print(1, 2, end=' ') |
| ⑤ | print >>sys.stderr, 1, 2, 3 |
print(1, 2, 3, file=sys.stderr) |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | if x <> y: |
if x != y: |
| ② | if x <> y <> z: |
if x != y != z: |
...
has_key() dictionary methodFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | aDictionary.has_key("PapayaWhip") |
"PapayaWhip" in aDictionary |
| ② | aDictionary.has_key(x) or aDictionary.has_key(y) |
x in aDictionary or y in aDictionary |
| ③ | aDictionary.has_key(x + y) |
(x + y) in aDictionary |
| ④ | x + aDictionary.has_key(y) |
x + (y in aDictionary) |
| ⑤ | aDictionary.has_key(x or y) |
(x or y) in aDictionary |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | aDictionary.keys() |
list(aDictionary.keys()) |
| ② | aDictionary.items() |
list(aDictionary.items()) |
| ③ | aDictionary.iterkeys() |
iter(aDictionary.keys()) |
| ④ | [i for i in aDictionary.iterkeys()] |
[i for i in aDictionary.keys()] |
| ⑤ | min(aDictionary.keys()) |
no change |
...
filter() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | filter(aFunction, aList) |
list(filter(aFunction, aList)) |
| ② | list(filter(aFunction, aList)) |
no change |
| ③ | filter(None, aList) |
[i for i in aList if i] |
| ④ | for i in filter(None, aList) |
no change |
| ⑤ | [i for i in filter(aFunction, aList)] |
no change |
...
map() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
apply() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
intern() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
exec statementFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
repr literals (backticks)FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
try...except statementFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
raise statementFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
throw statementFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
long data typeFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
xrange() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
raw_input() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
input() global methodFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
func_* function attributesFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
xreadlines() I/O methodFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
this includes fixer_imports, fixer_imports2, fixer_urllib
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
lambda functions with multiple parametersFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
__class__ special class attributeFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
next() iterator methodFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
__nonzero__ special class attributeFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
sys.maxintFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
unicode() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
callable() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
zip() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
StandardError() exceptionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
types module constantsFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
basestring datatypeFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
itertools moduleFIXME intro
this includes fixer_itertools, fixer_itertools_imports
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
sys.exc_type, sys.exc_value, sys.exc_tracebackFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
os.getcwdu() functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
set() literalsFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
buffer() global functionFIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...
FIXME intro
| Notes | Python 2 | Python 3 |
|---|---|---|
| ① | FIXME |
FIXME |
...