Python 3.2 and html.escape function

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon Feb 21 09:56:37 CET 2011


On Sun, 20 Feb 2011 15:33:39 +0100, Peter Otten wrote:

> Steven D'Aprano wrote:
> 
>> On Sun, 20 Feb 2011 08:15:35 -0500, Gerald Britton wrote:
>> 
>>> I see that Python 3.2 includes a new module -- html -- with a single
>>> function -- escape.  I would like to know how this function differs
>>> from xml.sax.saxutils.escape and, if there is no difference (or only a
>>> minor one), what the need is for this new module and its lone function
>> 
>> Unless the html API has changed radically since Python 3.2a, I believe
>> you are mistaken.
> 
> Adding a function is not /that/ radical, and it has happened, see
> 
> http://docs.python.org/dev/py3k/library/html.html

Well, I just learned something, thank you. I was under the mistaken 
impression that adding new functionality after the first alpha release 
was not permitted by the Python devs.



-- 
Steven



More information about the Python-list mailing list