mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
[3.12] Misc updates to Whatsnew 3.12 (GH-104912) (GH-104915)
This commit is contained in:
parent
51eb009cef
commit
4833f621b3
2 changed files with 36 additions and 3 deletions
|
@ -552,10 +552,10 @@ Exceptions
|
||||||
AttrDict(mapping, **kwargs)
|
AttrDict(mapping, **kwargs)
|
||||||
AttrDict(iterable, **kwargs)
|
AttrDict(iterable, **kwargs)
|
||||||
|
|
||||||
Subclass of :class:`dict` object that also supports attribute style dotted access.
|
Subclass of :class:`dict` that also supports attribute style dotted access.
|
||||||
|
|
||||||
This class is intended for use with the :attr:`object_hook` in
|
This class is intended for use with the :attr:`object_hook` in
|
||||||
:func:`json.load` and :func:`json.loads`::
|
:func:`json.load` and :func:`json.loads`:
|
||||||
|
|
||||||
.. doctest::
|
.. doctest::
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,11 @@ Other Language Changes
|
||||||
(Contributed by Nikita Sobolev in :gh:`100581`.)
|
(Contributed by Nikita Sobolev in :gh:`100581`.)
|
||||||
|
|
||||||
* :class:`slice` objects are now hashable, allowing them to be used as dict keys and
|
* :class:`slice` objects are now hashable, allowing them to be used as dict keys and
|
||||||
set items. (Contributed by Will Bradshaw and Furkan Onder in :gh:`101264`.)
|
set items. (Contributed by Will Bradshaw, Furkan Onder, and Raymond Hettinger in :gh:`101264`.)
|
||||||
|
|
||||||
|
* :func:`sum` now uses Neumaier summation to improve accuracy when summing
|
||||||
|
floats or mixed ints and floats.
|
||||||
|
(Contributed by Raymond Hettinger in :gh:`100425`.)
|
||||||
|
|
||||||
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer
|
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer
|
||||||
wrapped by a :exc:`RuntimeError`. Context information is added to the
|
wrapped by a :exc:`RuntimeError`. Context information is added to the
|
||||||
|
@ -493,12 +497,24 @@ itertools
|
||||||
tuples where the last batch may be shorter than the rest.
|
tuples where the last batch may be shorter than the rest.
|
||||||
(Contributed by Raymond Hettinger in :gh:`98363`.)
|
(Contributed by Raymond Hettinger in :gh:`98363`.)
|
||||||
|
|
||||||
|
json
|
||||||
|
----
|
||||||
|
|
||||||
|
* Added :class:`json.AttrDict` for use with ``object_hook`` in :func:`json.load`
|
||||||
|
or :func:`json.loads`. This is a subclass of :class:`dict` that also supports
|
||||||
|
attribute style dotted access.
|
||||||
|
(Contributed by Raymond Hettinger in :gh:`96145`.)
|
||||||
|
|
||||||
math
|
math
|
||||||
----
|
----
|
||||||
|
|
||||||
* Added :func:`math.sumprod` for computing a sum of products.
|
* Added :func:`math.sumprod` for computing a sum of products.
|
||||||
(Contributed by Raymond Hettinger in :gh:`100485`.)
|
(Contributed by Raymond Hettinger in :gh:`100485`.)
|
||||||
|
|
||||||
|
* Extended :func:`math.nextafter` to include a *steps* argument
|
||||||
|
for moving up or down multiple steps at a time.
|
||||||
|
(By Matthias Goergens, Mark Dickinson, and Raymond Hettinger in :gh:`94906`.)
|
||||||
|
|
||||||
os
|
os
|
||||||
--
|
--
|
||||||
|
|
||||||
|
@ -541,6 +557,15 @@ pdb
|
||||||
value.
|
value.
|
||||||
(Contributed by Tian Gao in :gh:`103693`.)
|
(Contributed by Tian Gao in :gh:`103693`.)
|
||||||
|
|
||||||
|
random
|
||||||
|
------
|
||||||
|
|
||||||
|
* Added :func:`random.binomialvariate`.
|
||||||
|
(Contributed by Raymond Hettinger in :gh:`81620`.)
|
||||||
|
|
||||||
|
* Added a default of ``lamb=1.0`` to :func:`random.expovariate`.
|
||||||
|
(Contributed by Raymond Hettinger in :gh:`100234`.)
|
||||||
|
|
||||||
shutil
|
shutil
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -594,6 +619,13 @@ sqlite3
|
||||||
to make configuration changes to a database connection.
|
to make configuration changes to a database connection.
|
||||||
(Contributed by Erlend E. Aasland in :gh:`103489`.)
|
(Contributed by Erlend E. Aasland in :gh:`103489`.)
|
||||||
|
|
||||||
|
statistics
|
||||||
|
----------
|
||||||
|
|
||||||
|
* Extended :func:`statistics.correlation` to include as a ``ranked`` method
|
||||||
|
for computing the Spearman correlation of ranked data.
|
||||||
|
(Contributed by Raymond Hettinger in :gh:`95861`.)
|
||||||
|
|
||||||
threading
|
threading
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -915,6 +947,7 @@ APIs:
|
||||||
* :func:`!unittest.makeSuite` (:gh:`50096`)
|
* :func:`!unittest.makeSuite` (:gh:`50096`)
|
||||||
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
|
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
|
||||||
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
|
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
|
||||||
|
* :class:`classmethod` descriptor chaining (:gh:`89519`)
|
||||||
|
|
||||||
Pending Removal in Python 3.14
|
Pending Removal in Python 3.14
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue