Author serhiy.storchaka
Recipients Jelle Zijlstra, r.david.murray, rhettinger, serhiy.storchaka, stutzbach
Date 2018-05-15.19:07:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526411274.05.0.682650639539.issue33519@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2018-05-15 19:07:54serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, stutzbach, r.david.murray, Jelle Zijlstra
2018-05-15 19:07:54serhiy.storchakasetmessageid: <1526411274.05.0.682650639539.issue33519@psf.upfronthosting.co.za>
2018-05-15 19:07:54serhiy.storchakalinkissue33519 messages
2018-05-15 19:07:54serhiy.storchakacreate