[Python-Dev] Allowing Unicode literals even without Unicode support?

Guido van Rossum guido@python.org
Tue, 28 May 2002 16:53:57 -0400


> Something I forgot last time around: as soon as we have
> Python source code encodings, disabling Unicode will no
> longer be "easy".
> 
> If you still want to proceed with this, then please add the
> test for ASCII-compatibility, since otherwise code can easily
> become non-portable between Python Unicode/non-Unicode builds
> anymore without anyone noticing.

IMO a simpler solution would be to check for en encoding cookie and
complain when Unicode is not enabled.

I am not interested in making everything work perfectly with Unicode
disabled -- that's not possible any more.  I *am* interested in being
able to run as much of the test suite as makes sense with Unicode
disabled.  This mostly means that code that contains tests of the form
"is this object a Unicode string?" should get an answer "no" rather
than an exception.  I am not interested in making code that uses
unicode() somehow work without it.

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