Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add what's new entry
  • Loading branch information
isidentical committed Oct 5, 2020
commit 427628456aee18c67e24978494e715b8a7e0ef8f
13 changes: 13 additions & 0 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ Summary -- Release highlights
New Features
============

.. _whatsnew310-pep563:

PEP 563: Postponed Evaluation of Annotations Becomes Default
------------------------------------------------------------

In Python 3.7, postponed evaluation of annotations added, to be enabled with
``from __future__ import annotations`` directive. In 3.10 this became the
default behavior, even without that future directive. With this being default
all annotations stored in :attr:`__annotations__` will be strings. If needed,
annotations can be resolved at runtime using :func:`typing.get_type_hints`.
See :pep:`563` for a full description. (Contributed by Batuhan Taskaya in
:issue:`38605`.)

* The :class:`int` type has a new method :meth:`int.bit_count`, returning the
number of ones in the binary expansion of a given integer, also known
as the population count. (Contributed by Niklas Fiekas in :issue:`29882`.)
Expand Down