[docs] [issue31995] Set operations documentation error

Raymond Hettinger report at bugs.python.org
Fri Nov 10 18:31:04 EST 2017


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

This is an artifact of how in-place operators work (which is a topic covered in the Library Reference).  It doesn't really have anything to do with frozensets specifically.  For example, you see the same effect with tuples which like frozensets are immutable and do not implement any of the in-place dunder methods:

    >>> s = ('a', 'b', 'c')
    >>> s += ('d', 'e')
    >>> s
    ('a', 'b', 'c', 'd', 'e')

IIRC, this is the first time this has come-up in the 15 year history of sets, so I don't think there is a real problem to be solved.  At best, this should be a FAQ entry or relegated to StackOverflow.  I would prefer not to alter the set documentation because doing so would likely create confusion rather than solve it.

----------
assignee: docs at python -> rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31995>
_______________________________________


More information about the docs mailing list