Issue 14020: Improve HTMLParser doc (original) (raw)

Created on 2012-02-15 13:59 by ezio.melotti, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue14020.diff ezio.melotti,2012-02-15 13:59 Patch against 2.7
Messages (7)
msg153401 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-02-15 13:59
Attached patch reworks a bit the HTMLParser doc: - moved the basic example on the top and showed the output; - added a more complete parser with other examples; - fixed some factual errors; - added additional information for some methods; - added a couple of headers to divide the sections; - rephrased the text a bit to be more coherent and clear; - fixed a few links, typos, and terms; I think the note about IE condcoms could be removed by the handle_comment doc, since it's already in the examples at the bottom. A note in handle_data about the behavior with buffered input might be added in addition to the example at the bottom.
msg153406 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-15 15:55
Didn’t review in detail but the plan LGTM. In a subsequent commit, you could update the markup to use nested class/method directives.
msg153489 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-02-16 17:41
Do you remember how to do it?
msg153563 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-17 16:29
It’s all in the Documenting Python doc. .. class:: HTMLParser() Blah blah. .. method:: feed(data) Do X and Y. The following attributes are supported: .. attribute:: pos etc.
msg153568 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-02-17 16:44
Yes, but there's a section with the example in the middle now, so that doesn't work. I was thinking about a way to tell sphinx "these are methods of the Foo class", without having them directly indented under the 'class' directive.
msg153577 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-02-17 17:19
Just indent the example, or move it below!
msg153611 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-18 00:03
New changeset 7052eb923fb8 by Ezio Melotti in branch '2.7': #14020: improve HTMLParser documentation. http://hg.python.org/cpython/rev/7052eb923fb8 New changeset 569566cbfd13 by Ezio Melotti in branch '3.2': #14020: improve HTMLParser documentation. http://hg.python.org/cpython/rev/569566cbfd13 New changeset 1850f45f6169 by Ezio Melotti in branch 'default': #14020: merge with 3.2. http://hg.python.org/cpython/rev/1850f45f6169
History
Date User Action Args
2022-04-11 14:57:26 admin set github: 58228
2012-02-18 00:04:13 ezio.melotti set status: open -> closedresolution: fixedstage: commit review -> resolved
2012-02-18 00:03:51 python-dev set nosy: + python-devmessages: +
2012-02-17 17:19:52 eric.araujo set messages: +
2012-02-17 16:44:57 ezio.melotti set messages: +
2012-02-17 16:29:17 eric.araujo set messages: +
2012-02-16 17:41:50 ezio.melotti set messages: +
2012-02-15 15:55:44 eric.araujo set messages: +
2012-02-15 13:59:31 ezio.melotti create