Refactor of the `doctest` documentation

Hello, I am new to CPython dev. My main reason is to improve the doctest documentation. Starting from the Option Flags (doctest — Test interactive Python examples — Python 3.11.5 documentation) the documentation was not clear at all. Also, I will like to be part of the those who will improve CPython documentation. I have build CPython on system. Please, I will need help in knowing what to do next. Thank you.

Please check our DevGuide which is our documentation on how to contribute to CPython.
Documentation contribution is very valuable, so thank you for your interest.

Can you clarify what is not clear, and what would make it better?

Edit: we also have a dedicated section on how to contribute to the docs: Helping with documentation

Thank for you reply, there are many unclear part in the doctest documentation but, specifically, I identify this two from the doctest documentation.

  1. Which Docstrings Are Examined :- The issue with the provided documentation lacks clarity and precision. It doesn’t clearly specify what “is true” means in the context of M.test, and it uses unclear language when describing how strings are treated. Additionally, it doesn’t explain why this information is relevant or how it’s practically used.

  2. Option flag :- The documentation provides detailed information about various option flags in doctest, but it lacks real-world examples or scenarios where these flags might be used. Without practical examples, users may find it challenging to understand when and how to apply these flags effectively in their code or documentation testing processes. Providing concrete examples and use cases would greatly enhance the usability of this documentation.

2 Likes

Doctest - No clear guidance on how to use the "Option Flag" and and the explanation of "Which Docstrings Are Examined" is ambiguos. · Issue #109510 · python/cpython · GitHub I have open a issue for this, I will be working on it.

1 Like