• The Complexity Of Python

    From Lawrence D?Oliveiro@3:633/10 to All on Fri Oct 30 04:25:56 2026
    A good measure of the complexity of a system is the length of its documentation. That is, assuming that the documentation is of good
    quality, and for Python I think it is.

    I decided to do a quick count of the length, by using WeasyPrint to
    convert the HTML pages to PDF files, and totalling up the number of
    PDF pages generated.

    For Python 3.14 (still the default on Debian Unstable as of this
    writing), the main language documentation is divided into 3 parts: the
    core language, the builtins, and the standard library.

    For the core language (files
    /usr/share/doc/python3.14/html/reference/*.html), I counted 271 pages
    total.

    For the builtins (files
    /usr/share/doc/python3.14/html/builtins/*.html), I counted 218 pages
    total.

    These counts might be slight overestimates. I saw a couple of extra
    pages with no body text in one or two PDF files, and also the default
    font seemed a bit large.

    For comparison, the Java 21 language spec, already provided as a PDF
    file, totals 872 pages. Note this is just the core language, not even
    including the java.lang package (the equivalent of Python?s builtins).

    This confirms the point, that Python is a much simpler language than
    Java. And yet it does this without compromising on power: Python
    manages to include niceties like multiple inheritance and operator
    overloads, which Java had to leave out.

    I also did a count of the standard library (files /usr/share/doc/python3.14/html/library/*.html); this consisted of 323
    separate HTML files, totalling 3915 formatted pages. It took nearly 20
    minutes to format and count all these.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)