What’s in which Python 3.4–3.6?

Thursday 22 March 2018

This is the third in a series of summarizations of what’s in each release of Python. The first two were What’s in which Python 2.x? and What’s in which Python 3.0–3.3?.

3.4: March 16, 2014

  • pip is always available, via ensurepip
  • asyncio (provisional API)
  • enum
  • Other stdlib modules: statistics, pathlib, and tracemalloc

Full list of 3.4 changes.

3.5: September 13, 2015

  • async and await syntax
  • matrix multiplication operator @
  • more unpacking generalizations
  • The typing module for type hints
  • subprocess.run()
  • os.scandir()

Full list of 3.5 changes.

3.6: December 23, 2016

  • f-strings
  • kwargs and class attributes order is preserved
  • dicts happen to be (but are not guaranteed to be) ordered
  • underscores in numeric literals
  • variable annotations
  • secrets module in stdlib

Full list of 3.6 changes.

Comments

[gravatar]
Tony F 5:02 PM on 24 Mar 2018

Great summary Ned - one small point - I understood the Guido has 'decreed' that ordering of dicts wil be a language feature from Python 3.6 onwards.

[gravatar]
Ned Batchelder 10:20 PM on 25 Mar 2018

@Tony F: dict ordering is not guaranteed by the language until 3.7.

[gravatar]
Tony F 9:14 PM on 26 Mar 2018

ok - I missed that nuance. So ordering in 3.6 happens to be a by product of other changes (notably compacted dictionary) - but ordering specifically is not guaranteed and a later 3.6 could break that ordering ?

[gravatar]
Nick Coghlan 12:02 PM on 9 Apr 2018

CPython 3.6 (the reference implementation) won't break the ordering, but *other* implementations of 3.6 aren't required to match that behaviour.

By contrast, the language definition itself changed for 3.7, so any conformant implementation is expected to make their builtin dictionaries work that way.

[gravatar]
Will Rogers 8:14 PM on 23 May 2018

Gonna need 3.7 pretty soon ...

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.