[Zope-Coders] x.startswith() vs. x[ ..]

Fred L. Drake, Jr. fdrake@acm.org
Tue, 4 Dec 2001 11:02:30 -0500


Chris Withers writes:
 > Not all of us use HTMLParser for Page Templates, it's part of the Python
 > Standard Library now ;-)
 > 
 > ...and that version should definitely make use of these enhancements.

  Which wasn't using the _contains_at() cruft at all.  I've scoured
the version in the Python standard library and updated it to use
faster 2.2-specific constructs just about everywhere (I left the
assert statements alone on purpose though).

 > Come to think of it, Page Templates on the Zope 3 branch probably shouldn't
 > include HTMLParser.py at all and should just use the one in the python standard

  A good point.  I'll see what I can do about this.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation