Skip to content

builtins: memoryview.cast's shape is kw-only #4939

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

Closed
wants to merge 1 commit into from

Conversation

hauntsaninja
Copy link
Collaborator

No description provided.

@Akuli
Copy link
Collaborator

Akuli commented Jan 17, 2021

This doesn't seem to be correct:

akuli@akuli-desktop:~$ python3.6
Python 3.6.10 (default, Apr 27 2020, 19:39:25) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> memoryview(b'asdfghjk').cast('i', (2,))[0]
1717859169
>>> 
akuli@akuli-desktop:~$ python3.7
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> memoryview(b'asdfghjk').cast('i', (2,))[0]
1717859169
>>> 
akuli@akuli-desktop:~$ python3.8
Python 3.8.0 (default, Oct 21 2019, 20:27:53) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> memoryview(b'asdfghjk').cast('i', (2,))[0]
1717859169
>>> 
akuli@akuli-desktop:~$ python3.9
Python 3.9.1 (default, Jan 11 2021, 15:01:24) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> memoryview(b'asdfghjk').cast('i', (2,))[0]
1717859169
>>> 

@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Jan 17, 2021

Thanks for checking! Looks like inspect.signature was "fixed" in python/cpython#21421 (I say "fixed" because the default value is NULL so inspect.signature now raises. But __text_signature__ now shows the right thing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants