Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

MutableSequence defines an interface. Adding a new method will break all 
classes that implemented this protocol but not the new method.

And what should .copy() return? list subclasses return an exact list, bytearray 
subclasses return an exact bytearray, but deque subclasses try to create an 
instance of the same type. Not all mutable sequences can be copyable. The 
constructor is not the part of the protocol.

The same problems are in MutableSet and MutableMapping. This is why they don't 
provide copy() methods (but concrete classes set and dict do).

----------
nosy: +serhiy.storchaka

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

Reply via email to