[issue42299] Remove formatter module

Terry J. Reedy report at bugs.python.org
Thu Nov 26 17:23:45 EST 2020


Terry J. Reedy <tjreedy at udel.edu> added the comment:

A coda on my 'obsolete and superseded' claim: text formatting events have 2 sources -- the text being displayed and user actions while reading.  formatter somewhat mixes these together.

html.parser.HTMLParser generates events from the text in the form of calls to handle_xyz methods, where 'xyy is most commonly 'starttag', 'data', 'endtag'.  HTMLPareser subclasses replace the default 'pass' implementations.  So the idea is similar to  formatter.NullFormatter.  IDLE uses the tkinter Text widget as the writer instance for its HTMLParser subclass.  Responses to events may depend on user settings, which may be changed by user events.

For a GUI app, user events are handled by the GUI framework and may or mayy not require user coding to handle.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42299>
_______________________________________


More information about the Python-bugs-list mailing list