Python's 8-bit cleanness deprecated?
romberg at smaug.fsl.noaa.gov
Mon Feb 10 23:17:01 CET 2003
>>>>> " " == Kirill Simonov <kirill_simonov at mail.ru> writes:
> * M.-A. Lemburg <mal at lemburg.com>:
>> No, but they'll need to pay some lucky Python programmer to get
>> rid off the warning :-) Seriously, the warning and the trouble
>> are intended as I already mentioned in the bug report Kirill
>> filed on SF: http://www.python.org/sf/681960/ :
> Sorry, but I'm not convinced. I hope you still have patience to
> hear my objections.
> And I can propose a perfect solution. If there are no defined
> encoding for a source file, assume that it uses a simple 8-bit
> encoding. Do not convert the file into UTF-8 in the
> tokenizer. And do not convert string literals in the
> compiler. Raise SyntaxError if a non-ASCII character is
> contained in a Unicode literal. We will even save a few CPU
> cycles for most Python source files using this approach.
I like this suggestion. The current behavior would prevent the
project I'm working on from ever using python 2.3. This seems like a
perfectly reasonable way to add this new support without causing havoc
to all the existing code that is out there.
More information about the Python-list