summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@gmail.com>2020-03-07 19:03:09 (GMT)
committerGitHub <noreply@github.com>2020-03-07 19:03:09 (GMT)
commit4663f66f3554dd8e2ec130e40f6abb3c6a514775 (patch)
tree479bda23ce4895419248e76431066a81d9088c94 /Doc
parent8f130536926a30237b5297780d61ef4232e88577 (diff)
downloadcpython-4663f66f3554dd8e2ec130e40f6abb3c6a514775.zip
cpython-4663f66f3554dd8e2ec130e40f6abb3c6a514775.tar.gz
cpython-4663f66f3554dd8e2ec130e40f6abb3c6a514775.tar.bz2
bpo-36144: Update MappingProxyType with PEP 584's operators (#18814)
We make `|=` raise TypeError, since it would be surprising if `C.__dict__ |= {'x': 0}` silently did nothing, while `C.__dict__.update({'x': 0})` is an error.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/types.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index 3529c2b..4cb91c1 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -282,6 +282,11 @@ Standard names are defined for the following types:
.. versionadded:: 3.3
+ .. versionchanged:: 3.9
+
+ Updated to support the new union (``|``) operator from :pep:`584`, which
+ simply delegates to the underlying mapping.
+
.. describe:: key in proxy
Return ``True`` if the underlying mapping has a key *key*, else