13.04.21 15:47, Peter Otten пише:
> As to the | operator, maybe it could be added to Mapping?
The | operator returns a new instance, but constructor is not a part of
the Mapping interface. You cannot make a general implementation, and
making __or__ an abstract method will break all existing
12.04.21 19:01, Andreas R Maier пише:
> Hi,
> I have written some classes that represent immutable views on collections
> (see "immutable-views" package on Pypi).
>
> Currently, these view classes inherit from the abstract collection classes
> such as Mapping, Sequence, Set. However, they
On 12/04/2021 18:01, Andreas R Maier wrote:
Hi,
I have written some classes that represent immutable views on collections (see
"immutable-views" package on Pypi).
Currently, these view classes inherit from the abstract collection classes such as Mapping,
Sequence, Set. However, they implement
Hi,
I have written some classes that represent immutable views on collections (see
"immutable-views" package on Pypi).
Currently, these view classes inherit from the abstract collection classes such
as Mapping, Sequence, Set. However, they implement the read-only methods of
dict, list and set,