LaTeX expects documents to be arranged in a conventional, hierarchical way, with chapters, sections, sub-sections, appendixes, and the like. These are marked using macros rather than environments, probably because the end of a section can be safely inferred when a section of equal or higher level starts.
There are six ``levels'' of sectioning in the document classes used for Python documentation, and the deepest two levels1 are not used. The levels are:
manualdocuments, as described in section 5, ``Document Classes.''