bpo-30977: rework code changes according to post-merge code review (GH-9106)

also mention the change and its consequences in What's New
This commit is contained in:
Tal Einat 2018-09-10 16:11:04 +03:00 committed by GitHub
parent 1f36bf6077
commit 54752533b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 144 additions and 66 deletions

View file

@ -131,6 +131,10 @@ Optimizations
objects (e.g. tuple, list, dict) size is reduced 4 or 8 bytes.
(Contributed by Inada Naoki in :issue:`33597`)
* :class:`uuid.UUID` now uses ``__slots__`` to reduce its memory footprint.
Note that this means that instances can no longer be weak-referenced and
that arbitrary attributes can no longer be added to them.
Build and C API Changes
=======================
@ -275,6 +279,9 @@ Changes in the Python API
* The function :func:`math.factorial` no longer accepts arguments that are not
int-like. (Contributed by Pablo Galindo in :issue:`33083`.)
* :class:`uuid.UUID` now uses ``__slots__``, therefore instances can no longer
be weak-referenced and attributes can no longer be added.
CPython bytecode changes
------------------------