New submission from James Paget: The operator -= modifies a frozenset (this should not be possible), instead of signaling a TypeError. Contrast with the += operator.
>>> f=frozenset([1,2]) >>> f frozenset([1, 2]) >>> f -= frozenset([1]) >>> f frozenset([2]) >>> f -= frozenset([2]) >>> f frozenset([]) >>> f += frozenset([2]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +=: 'frozenset' and 'frozenset' >>> ---------- components: Interpreter Core messages: 227557 nosy: James.Paget priority: normal severity: normal status: open title: frozenset allows modification via -= operator type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22498> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com