bpo-33234: Add exact allocation optimization to lists in What's New (GH-10200)

In commit 372d705 a new optimization to the list() type was introduced but it was not added
to the optimization section in What's new for Python 3.8.
This commit is contained in:
Pablo Galindo 2018-10-28 22:03:18 +00:00 committed by GitHub
parent 47d94241a3
commit c61e229d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -242,6 +242,11 @@ Optimizations
Note that this means that instances can no longer be weak-referenced and
that arbitrary attributes can no longer be added to them.
* The :class:`list` constructor does not overallocate the internal item buffer
if the input iterable has a known length (the input implements ``__len__``).
This makes the created list 12% smaller on average. (Contributed by Pablo
Galindo in :issue:`33234`.)
Build and C API Changes
=======================