-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Missing bytearray.copy in Python 3 #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
and this, |
Making changes to typeshed is easy. Could you just submit a PR adding a copy method to bytearray? |
@JelleZijlstra I didn't really understand the rationale for not putting it on |
There does seem to be a discrepancy between the docs and the implementation, in that the MutableSequence ABC in the stdlib does not define a copy() method. Two solutions:
|
Hmm, I see your rationale. Since even if the issue gets fixed in Python 3.7 we'd want to add Cool, if I get a chance I'll take a look at making that PR - unless somebody else beats me to it. |
Fixes python#1715. 2.7's bytearray doesn't have it.
Fixes #1715. 2.7's bytearray doesn't have it.
Fixes python#1715. 2.7's bytearray doesn't have it.
Fixes python#1715. 2.7's bytearray doesn't have it.
The superclass
MutableSequence
of builtin objectbytearray
is not properly typed in the current stub file(stdlib/3/typing.pyi
), which is missing methodclear
.The text was updated successfully, but these errors were encountered: