[issue40702] frozensets should not allow the |= operator

2020-05-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is okay. In this case `a |= b` is equivalent to `a = a | b`. The same behavior is for tuples, strings, and other non-mutable collections: t = (1, 2) t += (3, 4) s = 'ab' s += 'cd' And even for numbers! i = 5 i += 1 -- nosy: +serhiy.storchaka r

[issue40702] frozensets should not allow the |= operator

2020-05-20 Thread Chris Cordero
New submission from Chris Cordero : Frozensets disallow the .update and the .__ior__ methods from being used, but allows the |= operator, which I think is inconsistent with the disallowed methods†. ``` foo = frozenset() print(foo) # frozenset() foo.update({"hello"}) # AttributeErr