This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients docs@python, furkanonder, lisroach, rhettinger, skrah
Date 2021-12-01.03:21:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638328880.28.0.754183600167.issue27779@roundup.psfhosted.org>
In-reply-to
Content
One way to do is to dynamically update the docstrings on import.  Something like this:

for name in dir(_decimal.Decimal):
    if name.startswith('_'):
        continue
    py_method = getattr(_decimal.Decimal, name)
    py_doc = py_method.__doc__
    if py_doc is None:
        continue
    c_method = getattr(_pydecimal.Decimal, name, None)
    if c_method is None:
        continue
    c_doc = c_method.__doc__
    if c_doc is None or len(c_doc) < len(py_doc):
        c_method.__doc__ = py_doc
History
Date User Action Args
2021-12-01 03:21:20rhettingersetrecipients: + rhettinger, skrah, docs@python, lisroach, furkanonder
2021-12-01 03:21:20rhettingersetmessageid: <1638328880.28.0.754183600167.issue27779@roundup.psfhosted.org>
2021-12-01 03:21:20rhettingerlinkissue27779 messages
2021-12-01 03:21:20rhettingercreate