I read this Google Style Python Docstrings Example to understand how good Python documentation is written. But I can’t understand anything.
When documenting strings, there is such a strange notation.
For example, when documenting arguments, the documentation states that they should be written as follows:
Args:
arg1(str): The description for arg1
But in some other places the document writes something like:
Args:
param2 (:obj:`str`, optional): The second parameter.
In the second case, why is the string presented as :obj:`str`, and not just str? Why two submissions for stringsfirst? When will I use which?
source
share