[Python-Dev] Alternative Implementation for PEP 292:SimpleString Substitutions

Aahz aahz at pythoncraft.com
Sat Sep 4 01:49:45 CEST 2004


On Fri, Sep 03, 2004, Raymond Hettinger wrote:
>
> The PEP was about simplification.  Tossing in unnecessary unicode
> coercions is not in line with that goal.
> 
> Does anyone else think this is a crummy idea?
> Is everyone ready for unicode coercions to start sprouting everywhere?

+0 (agreeing with Raymond)

Correct me if I'm wrong, but there are a couple of issues here:

* First of all, I believe that unicode strings are interoperable (down
to hashing) with 8-bit strings, as long as there are no non-7-bit ASCII
characters.  Where things get icky is with encoded 8-bit strings making
use of e.g. Latin-1.  So the question is whether we need full
interoperability.

* Unicode strings take four bytes per character (not counting decomposed
characters).  Is it fair at this point in Python's evolution to force
this kind of change in performance metric, essentially silently?

The PEP and docs do make the issue of Unicode fairly clear up-front, so
anyone choosing to use template strings knows what zie is getting into.
But what about someone grabbing a module that uses template strings
internally?....

OTOH, I'm not up for making a big issue out of this.  If Raymond really
is the only person who feels strongly about it, it probably isn't going
to be a big deal in practice.  In addition, I think it's the kind of
change that could be easily fixed in the next release.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I saw `cout' being shifted "Hello world" times to the left and stopped
right there."  --Steve Gonedes


More information about the Python-Dev mailing list