English Spanish
An ongoing challenge within the Python 3 series has been determining a sensible default strategy for handling the “7-bit ASCII” text encoding assumption currently implied by the use of the default C locale.
A range of performance improvements.
Fedora 26 brings in a new Python Classroom Lab. A variant of Fedora targeted at teachers and students of the Python programming langugae. A ready to use environment with Python, PyPy 3, virtualenv, tox, git, Jupyter Notebook and more. It's ready in three variants: as a GNOME powered desktop or headless for Vagrant and Docker.
File system path protocol: Many more standard library APIs, including the builtin `open()`, now support `pathlib.Path` and `pathlib.PurePath` objects
Find out more about the Python Classroom Lab on the link:++https://labs.fedoraproject.org/en/python-classroom/++[Fedora Labs] website.
Formatted string literals (f-strings): `f"This will be evaluated to foo's value: \{foo}"`
For more detailed information see the link:++https://fedoramagazine.org/python-3-6-0-fedora-26/++[Fedora Magazine announcement article] or the link:++https://docs.python.org/3.6/whatsnew/3.6.html++[upstream release notes]. Note the link:++https://docs.python.org/3.6/whatsnew/3.6.html#porting-to-python-3-6++[Porting to Python 3.6] section, which lists important information for developers who need to port their Python 3.5 applications.
Full details of this new Python feature are contained in link:++https://www.python.org/dev/peps/pep-0538/++[PEP 538 -- Coercing the legacy C locale to a UTF-8 based local].
Notable new features include:
Python 3.6 will be the default Python 3 stack in Fedora 26. This is an upgrade from 3.5 which was included in Fedora 25. All packages which depend on Python 3 must be rebuilt. User-written Python 3 scripts and applications may require a small amount of porting; however, Python 3.5 is forward compatible with Python 3.6 for the most part.
Python 3 C.UTF-8 locale
Starting with Fedora 26, the Fedora system Python includes a backport of Python 3.7's upcoming link:++https://docs.python.org/dev/whatsnew/3.7.html#pep-538-legacy-c-locale-coercion++[locale coercion] feature, which means the Python 3 stack will automatically coerce the C locale to C.UTF-8 by setting the `LC_CTYPE` environment variable (if neither it nor `LC_ALL` are already set) before configuring the process locale. Automatically setting `LC_CTYPE` this way means that both the core interpreter and locale-aware C extensions (such as `readline`) will assume the use of UTF-8 as the default text encoding, rather than ASCII.
The new `secrets` module provides handy helpers for secure token generation in various formats
The order of elements in `+**kwargs: keyword+` arguments now preserve their order
Underscores in numeric literals let you break up magic constants to make them easier to read: `1_000_000`