<div dir="ltr">On Mon, Apr 15, 2013 at 12:56 AM, David Lam <span dir="ltr"><<a href="mailto:david.k.lam1@gmail.com" target="_blank">david.k.lam1@gmail.com</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div style="font-family:arial,sans-serif;font-size:13px">


I tried to find an example in the source which addressed this, but</div><div style="font-family:arial,sans-serif;font-size:13px">found that the docstrings in similar cases to be largely duplicated. </div></div>
</div></blockquote><div><br></div><div>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.</div>


<div><br></div><div>     >>> import _json</div><div>     >>> help(_json.scanstring)<br><div>     scanstring(...)</div><div>        scanstring(basestring, end, encoding, strict=True) -> (str, end)</div>


<div><br></div><div>        Scan the string s for a JSON string. End is the index of the</div><div>        character in s after the quote that started the JSON string.</div><div>        [...]</div><div><br></div><div>
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.</div>


</div></div></div></div>