Creating Python Function docstrings and Running doctests

preview_player
Показать описание
What information goes into a Python function docstring? How can you create tests within your docstrings, that can be checked with doctests?

This is a portion of a full course on creating documentation for your projects using MkDocs and mkdocstrings.

The complete course can be found here:

The full course also includes how to:
- Work with MkDocs to produce static pages from Markdown
- Pull in code documentation from docstrings using mkdocstrings
- Use the Material for MkDocs theme to make your documentation look good
- Host your documentation on GitHub Page
Рекомендации по теме
Комментарии
Автор

wow!! thank you very much. Your explanation is very clear and precise. I have learn't from you in 14 minutes what I couldn't grasp from reading a documentation about docstring for 3 hours. From now on, I will be python code that iw well documented. Thanks a million times. You are making a real difference.

rugmaable
Автор

But why aren't you using type hints?? 😄

ropro