[XML-SIG] Re: Issues with Unicode type

Fred L. Drake, Jr. fdrake@acm.org
Tue, 24 Sep 2002 10:05:37 -0400


Uche Ogbuji writes:
 > I don't see the significant space requirments.  As for CPU,
 > Python's len() is already much slower than wstrlen() anyway, so I
 > don't think your point is very valid once someone has already made
 > the choice to use Python.

What do you wanna bet that a lot of that is the global lookup of len()
and not the call itself?  Not that either is trivial compared to
wstrlen(), unless of course the string is long.  ;-)

Remember, the slow global looks are already a target for serious
optimizations, so expect some of the overhead to disappear.

 > You can subclass strings in Python 2.2 and more recent.  Tyes and
 > classes were unified in Python 2.2.

Python 2.2 implemented the first stage of the type/class unification;
it did not complete it.  There are still "class" and "instance" types,
and you still deal with them using a traditional class statement
without a new-style base class of module-global setting of __metatype__.


  -Fred

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