I tried to find an example in the source which addressed this, but
found that the docstrings in similar cases to be largely duplicated.
I find this annoying too. It would be nice to have a common way to share docstrings between C and Python implementations of the same interface. One roadblock though is functions in C modules often document their parameters in their docstring.
Scan the string s for a JSON string. End is the index of the
character in s after the quote that started the JSON string.
[...]
Argument clinic will hopefully lift this roadblock soon. Perhaps, we could add something to the clinic DSL a way to fetch the docstring directly from the Python implementation. And as an extra, it would be easy to add verification step as well that checks the both implementations provide a similar interfaces once we have this in place.