[issue33519] Should MutableSequence provide .copy()?

2019-05-18 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker ___

[issue33519] Should MutableSequence provide .copy()?

2019-05-18 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset 9892f454d11b7ea9ba394a115b3e6f48ef6f78fe by Cheryl Sabella (Jelle Zijlstra) in branch 'master': bpo-33519: clarify that .copy() is not part of the MutableSequence ABC (GH-6965) https://github.com/python/cpython/commit/9892f454d11b7ea9ba394a115b3

[issue33519] Should MutableSequence provide .copy()?

2018-05-17 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- keywords: +patch pull_requests: +6623 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Makes sense. I can provide a patch to the docs. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Should we add .copy() to the ABC or remove the promise that all mutable > sequences implement .copy()? The second option would be best. Let's just clarify that copy() isn't part of the MutableSequence API. The first option isn't really a choice be it w

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Serhiy Storchaka
Serhiy Storchaka 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

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread R. David Murray
R. David Murray added the comment: On the other hand, that section does reference the ABC directly, so I can see the point of your question. So I guess I'm not sure what the answer is...I don't think copy is an essential part of the ABC, but I'm not sure. --

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread R. David Murray
R. David Murray added the comment: The ABCs are different from the standard types provided by python itself. The former are a minimal subset of the methods provided by the latter. So I think the answer is neither. -- nosy: +r.david.murray ___ Pyt

[issue33519] Should MutableSequence provide .copy()?

2018-05-15 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.7/library/stdtypes.html#mutable-sequence-types lists .copy() among the methods provided by mutable sequences. However, MutableSequence does not actually define .copy(): https://github.com/python/cpython/blob/master/Lib/_collections