You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _cpython module provides bindings to CPython, so it should reflect and wrap it in a consistent way, with corresponding documentation. Currently some things are missing though.
This involves:
Links to the official documentation, or docstrings which accurately describe the function
Documenting cases where a function raises
Maybe this could fall under bindgen and be done automatically:
We could put the ref comments in and later pull in the documentation automatically and put it in as a docstring.
However, the documentation does not seem very gen-friendly.
Anything else?
This was talked about in the public stdlib discussion here) @soraros started work on cleaning it up here
The text was updated successfully, but these errors were encountered:
- [X] Document PyGILState_STATE
- [X] Rename PyKeyValuePair to PyKeysValuePair to match CPython
- [X] Add docstrings to all the structs in cpython.mojo
- [X] Add single docstring regarding C-API docs to all the functions
Related issue: #3661
Co-authored-by: Manuel Saelices <[email protected]>
Closes#3664
MODULAR_ORIG_COMMIT_REV_ID: d464718f686c30d0c223c812b2fa8eb67fb654b6
Where is the problem?
https://github.com/modularml/mojo/blob/main/stdlib/src/python/_cpython.mojo
What can we do better?
The
_cpython
module provides bindings to CPython, so it should reflect and wrap it in a consistent way, with corresponding documentation. Currently some things are missing though.This involves:
Maybe this could fall under bindgen and be done automatically:
We could put the ref comments in and later pull in the documentation automatically and put it in as a docstring.
However, the documentation does not seem very gen-friendly.
Anything else?
This was talked about in the public stdlib discussion here)
@soraros started work on cleaning it up here
The text was updated successfully, but these errors were encountered: