diff options
author | Inada Naoki <songofacandy@gmail.com> | 2020-03-02 09:54:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 09:54:48 (GMT) |
commit | 211055176157545ce98e6c02b09d624719e6dd30 (patch) | |
tree | a5727a736333dd62017bfcaa5ed57b6c1f2336eb /Doc | |
parent | 9f1cb1bb49476246de5d9ed5fe680301cf7f7571 (diff) | |
download | cpython-211055176157545ce98e6c02b09d624719e6dd30.zip cpython-211055176157545ce98e6c02b09d624719e6dd30.tar.gz cpython-211055176157545ce98e6c02b09d624719e6dd30.tar.bz2 |
bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/inspect.rst | 11 | ||||
-rw-r--r-- | Doc/whatsnew/3.9.rst | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 9b9bc99..d00a30f 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -624,18 +624,15 @@ function. .. attribute:: Signature.parameters - An dictionary of :class:`Parameter` objects. Parameters appear in strict - definition order, including keyword-only parameters. + An ordered mapping of parameters' names to the corresponding + :class:`Parameter` objects. Parameters appear in strict definition + order, including keyword-only parameters. .. versionchanged:: 3.7 Python only explicitly guaranteed that it preserved the declaration order of keyword-only parameters as of version 3.7, although in practice this order had always been preserved in Python 3. - .. versionchanged:: 3.9 - :attr:`parameters` is now of type :class:`dict`. Formerly, it was of - type :class:`collections.OrderedDict`. - .. attribute:: Signature.return_annotation The "return" annotation for the callable. If the callable has no "return" @@ -824,7 +821,7 @@ function. .. attribute:: BoundArguments.arguments - An ordered, mutable mapping of parameters' names to arguments' values. + A mutable mapping of parameters' names to arguments' values. Contains only explicitly bound arguments. Changes in :attr:`arguments` will reflect in :attr:`args` and :attr:`kwargs`. diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 3364f39..f49575d 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -218,6 +218,12 @@ now raises :exc:`ImportError` instead of :exc:`ValueError` for invalid relative import attempts. (Contributed by Ngalim Siregar in :issue:`37444`.) +inspect +------- + +:attr:`inspect.BoundArguments.arguments` is changed from ``OrderedDict`` to regular +dict. (Contributed by Inada Naoki in :issue:`36350` and :issue:`39775`.) + ipaddress --------- |