How to learn a package in python

import pkg
dir(pkg)

such an operator in python will not show all classes / functions / subpackages in the pkg package, because some of them can be loaded just in time. So what is the best way to learn the package in python?

+3
source share
3 answers

Try pydoc

pydoc package

It’s the same as calling a help function, but you can do it from the command line, and of course you can go to the module, class or level of the function using dot notation.

+3
source

Read the source, read the module documents.

+2
source

You can use help(pkg)either explicitly the document, if available.

+1
source

Source: https://habr.com/ru/post/1773337/


All Articles