This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Frédéric Jolliton
Recipients Frédéric Jolliton, aroberge, belopolsky, berker.peksag, donmez, eric.araujo, ezio.melotti, georg.brandl, lukasz.langa, rhettinger, ron_adam, vterron
Date 2015-07-18.20:56:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1437252975.64.0.54695196923.issue10716@psf.upfronthosting.co.za>
In-reply-to
Content
Oh god. The HTML produced by pydoc is awful.

This is absolutely nothing modern about it.

The code itself hurts my brain. It feels very old (14 years old..), and the HTML production is overly complex, and hard to check regarding correct quoting/escaping.

Generating modern HTML5/CSS would mean:

 - Using <h1>, <h2>, for section title,
 - Forget about <br> (this element should never be used nowadays),
 - Forget about <hr> (let the CSS decide when to insert a visual separator after/before a given element),
 - Don't use <code> for block of code. This is an inline element. Use <pre class="code"> for example.
 - Don't use <table> all over the place for formatting everything (use <li> for the list of modules for instance),
 - Drop these useless <dd></dd> (empty!)
 - No need to replace \n by <br>, or to replace space by &nbsp;. The formatting can be achieved by white-space: pre in CSS.
 - <a name=".."> or <a id=".."> could be replaced by <span id=".." class=".."> to distinguish them from hyperlinks.
 - the table "docclass" could be a serie of <h2> (or <h3>) title followed by the content of the section. The table seems useless because there are no particular requirement for an alignment.
 - and so on, and so on, ..

Actually, I think this need a complete rewrite.

This is a useful tool to have included with Python, but this need a serious refresh.

To me, a "modern" documentation is something like this (from the Rust documentation):

    https://doc.rust-lang.org/std/option/enum.Option.html
    https://doc.rust-lang.org/std/option/index.html

(Look at the generated HTML too. It's rather straightforward.)
History
Date User Action Args
2015-07-18 20:56:15Frédéric Jollitonsetrecipients: + Frédéric Jolliton, georg.brandl, rhettinger, belopolsky, ron_adam, donmez, aroberge, ezio.melotti, eric.araujo, lukasz.langa, berker.peksag, vterron
2015-07-18 20:56:15Frédéric Jollitonsetmessageid: <1437252975.64.0.54695196923.issue10716@psf.upfronthosting.co.za>
2015-07-18 20:56:15Frédéric Jollitonlinkissue10716 messages
2015-07-18 20:56:14Frédéric Jollitoncreate