[Python-Dev] Re: Alternative Implementation for PEP292:SimpleString Substitutions

M.-A. Lemburg mal at egenix.com
Wed Sep 8 16:56:28 CEST 2004

Fredrik Lundh wrote:
> Barry wrote:
>>I'll point out that Template was very deliberately subclassed from
>>unicode, so Template instances /are/ unicode objects.  From the
>>standpoint of type conversion, using /F's notation, T(8) == U, thus
>>because U % 8 == U, T(8) % 8 == U.
> from a user perspective, there's no reason to make templates a sub-
> class of unicode, so the rest of your argument is irrelevant.

Templates are meant to template *text* data, so Unicode is
the right choice of baseclass from a design perspective.

> instead of looking at use patterns, you're stuck defending the existing
> code.  that's not a good way to design usable code.

Perhaps I'm missing something, but where would you use Templates
for templating binary data (where strings or bytes would be a more
appropriate design choice) ?

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Sep 08 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Python-Dev mailing list