Two years ago I wrote a post called What’s in which Python 2.x? which summarized the changes in the Python 2.x releases. Today when I showed it to someone, they asked, “Do you have one for 3.x?”
Here it is. BTW, there is also What’s in which Python 3.4–3.6?.
Update: I’ve now collected all the “What’s in which Python”s onto a single page: What’s in which Python.
Some things to remember about Python 3:
- 3.0 came out about the same time as 2.6, so they share a number of features. 2.7 came out between 3.1 and 3.2, so there’s overlap there as well.
- A language moratorium prevented significant changes in 3.2.
- strings are now unicode, no u”” literals
- print as a function
- iterators instead of lists: range, .keys, .items, .values, zip, map, filter
- function annotations
- lots of things moved in the standard library
- OrderedDict and Counter classes
- __pycache__ directories
- hasattr doesn’t swallow all exceptions
- yield from
- u”” literals are back
- hash randomization
- New flexible string representation
- venv module
- more of import implemented in Python