[Python-Dev] global encoding?!? (was: [Python-checkins] ... unicodeobject.c)

Guido van Rossum guido@python.org
Tue, 09 May 2000 16:24:05 -0400


> Umm... maybe I missed something, but I thought there was pretty broad
> feelings *against* having a global like this. This kind of thing is just
> nasty.
> 
> 1) Python modules can't change it, nor can they rely on it being a
>    particular value
> 2) a mutable, global variable is just plain wrong. The InterpreterState
>    and ThreadState structures were created *specifically* to avoid adding
>    crap variables like this.
> 3) allowing a default other than utf-8 is sure to cause gotchas and
>    surprises. Some code is going to rightly assume that the default is
>    just that, but be horribly broken when an application changes it.
> 
> Somebody please say this is hugely experimental. And then say why it isn't
> just a private patch, rather than sitting in CVS.

Watch your language.

Marc did this at my request.  It is my intention that the encoding be
hardcoded at compile time.  But while there's a discussion going about
what the hardcoded encoding should *be*, it would seem handy to have a
quick way to experiment.

--Guido van Rossum (home page: http://www.python.org/~guido/)