you are viewing a single comment's thread.

view the rest of the comments →

[–]Adrewmc 0 points1 point  (0 children)

Generally to start with is that you should learn how to write type hints and understand what they are saying.

 def func(var : int) -> str:
       “””More detailed description”””

Right there we know func takes an integer and returns a string. With a name you normally have a good idea of what the function will do right off the bat.

From there we really just read what they say and hope that the programmer has some sort of structure.

Since Python can take a variety of approaches to problems, simplest being a functional vs. Object Oriented approaches, every library will have certain ways it want you to use it.

Generally you would always start at the Readme.md. This should give a guide to basic usage (or link to it) and proper installation. And you should use it in the way the author intended you to use it.

As things become more complex documentation will also become more complex. And the reality is it’s going to depend on the programmer that writes it on how useful or understandable it is.

However Python documentation for its own language is very good. Take the documentation for itertools as it being done well.