-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
ctypes: Add docstring for ctypes.Array
#107689
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
Can I work on this? |
Go ahead! |
@tomasr8 we can close this now as it's been merged. Thanks! |
Does this need backporting (to 3.11)? Docs things usually are, I'm not sure about docstrings. |
No idea what the general policy is, but searching for merged docstring PRs, I found a couple which did get backported (e.g. #103113) |
Hey! Is this issue still open? |
The PR was |
Uh oh!
There was an error while loading. Please reload this page.
Documentation
The
Array
class from thectypes
module doesn't have a proper docstring:Though the class is documented in the docs so we could just reuse that description.
Feel free to pick up this issue :) If you're new to the C internals, here's a small guide to help you get started:
ctypes.Array
is a class implemented in C defined inModules/_ctypes/_ctypes.c
. Here is the current docstring definition:cpython/Modules/_ctypes/_ctypes.c
Lines 4816 to 4818 in 71a7c96
To update the docstring, we could simply change the argument of
PyDoc_STR(...)
but if the docstring is longer it's better to use PyDoc_STRVAR to create a separate variable with the new docstring:then you substitute it back instead of
PyDoc_STR
:To test that it worked, rebuild python and check the docstring ;)
Linked PRs
The text was updated successfully, but these errors were encountered: