New submission from Chris Cordero <ccord...@protonmail.com>:

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"})  # AttributeError, expected
foo.__ior__({"hello"}) # AttributeError, expected
foo |= {"hello"}       # No error
print(foo)             # frozenset({"hello"})
```

----------
messages: 369470
nosy: cs-cordero
priority: normal
severity: normal
status: open
title: frozensets should not allow the |= operator
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40702>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to