-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
gh-76187: Document the c
typecode for multiprocessing.Array
.
#132504
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also mention that the w
typecode of array is not supported? (glancing at the code, it is missing from Lib/multiprocessing/sharedctypes.py)
Will do. Do you think it's worth to improve the error message for invalid typecodes as well? >>> array('x')
...
ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d) (And I just noticed that the error message doesn't include 'w' 😆 ) |
Yeah, improving the error message and/or even adding 'w' support are all also viable options. I expect this part of the code was inherited from the original upstream project multiprocessing came from and likely hasn't been meaningfully touched since? It's a dark corner. |
Updated to mention that
I'll send a patch to improve the error message and align it with that of |
I linked to the ctypes types table and added this sentence:
The rest of the diff is just wrapping.
📚 Documentation preview 📚: https://cpython-previews--132504.org.readthedocs.build/