[Python-Dev] Re: internal value (was: Hash values and comparing objects)

M.-A. Lemburg mal@lemburg.com
Fri, 07 Jul 2000 10:16:09 +0200


Greg Stein wrote:
> 
> On Thu, Jul 06, 2000 at 06:28:12PM +0200, M.-A. Lemburg wrote:
> >...
> > Previously, Unicode used UTF-8 as basis for calculating the
> > hash value (the Unicode object created a UTF-8 string object
> > and delegated the hash value calculation to it, caching the
> > result and the string for future use). Since I would like
> > to make the internal encoding cache use the default encoding
> > instead, I have two problems to solve:
> 
> Woah... are you saing that the "t#" marker could now return arbitrary
> encodings? That C code cannot depend on any particular encoding?

Right. If C code needs a particular encoding other than
the locale dependent default encoding, it'll have to use
"es#".
 
> Why? This is a pretty big semantic change.

It completes the switch from the fixed UTF-8 encoding to the
locale dependent default encoding which we decided on
a couple of weeks ago.

Note that this change will make enhance compatibility with
existing C extensions since they will now get the encoding
that is default for them anyway... well, at least they
stand a good chance ;-)

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/