From 9f524701500469d58263f7fadcc1b06635b745fd Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Tue, 26 Nov 2024 19:09:01 -0600 Subject: [PATCH 1/2] Clarify mutating in-place operators for frozensets --- Doc/library/stdtypes.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 4f4fc9fba63120..6b91eb926b468d 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4415,8 +4415,9 @@ The constructors for both classes work the same: return the type of the first operand. For example: ``frozenset('ab') | set('bc')`` returns an instance of :class:`frozenset`. - The following table lists operations available for :class:`set` that do not - apply to immutable instances of :class:`frozenset`: + The following mutating operations are available for :class:`set` instances. + For :class:`frozenset` instances, only the in-place variants of these operations + (``|=``, ``&=``, ``-=``, and ``^=``) are supported. .. method:: update(*others) set |= other | ... From a888e53072273cd4d04596d18c8e78fc59ed62ca Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Tue, 26 Nov 2024 20:56:32 -0600 Subject: [PATCH 2/2] slight reformulation --- Doc/library/stdtypes.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 6b91eb926b468d..d191e4c5eb8f84 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4416,8 +4416,8 @@ The constructors for both classes work the same: set('bc')`` returns an instance of :class:`frozenset`. The following mutating operations are available for :class:`set` instances. - For :class:`frozenset` instances, only the in-place variants of these operations - (``|=``, ``&=``, ``-=``, and ``^=``) are supported. + For :class:`frozenset` instances, only the augmented assignment variants of + these operations (``|=``, ``&=``, ``-=``, and ``^=``) are supported. .. method:: update(*others) set |= other | ...