This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients ebfe, lemburg, pitrou, vstinner
Date 2009-01-05.10:44:25
SpamBayes Score 0.034584768
Marked as misclassified No
Message-id <4961E488.4060202@egenix.com>
In-reply-to <200901042351.39426.victor.stinner@haypocalc.com>
Content
On 2009-01-04 23:51, STINNER Victor wrote:
> STINNER Victor <victor.stinner@haypocalc.com> added the comment:
> 
>> The fact that Python 2.x also accepts Unicode ASCII strings 
>> where strings are normally expected is intended to help with 
>> the migration to Unicode
> 
> I hate this behaviour. It doesn't help migration, it's the opposite! Sometimes 
> it works (ASCII), and somtimes it fails (just one non-ASCII character). And 
> then we will read "Unicode sucks!" because people doesn't understand the 
> error.

Well, that's your opinion.

The feature was added to get people
work with Unicode at all, since otherwise we would have had to do
all the Unicode porting we're doing now for Python 3 at the time
Unicode was introduced - which was in version Python 1.6, eight years
ago.

At the time the Python community was a lot smaller and there wasn't
all that much interest in Unicode anyway - the Unicode support I wrote
for Python 1.6 was partially financed by HP which needed it for an
application they had written in Python.

See the introduction in PEP 100 for the motivation behind the design
decisions:

http://www.python.org/dev/peps/pep-0100/

>> In Python 3.x, it's probably better to use bytes throughout the
>> API.
> 
> I propose to reject unicode in Python 3.x and display a warning for Python 
> 2.x. A warning to prepare the migration... not to Unicode, but to Python3 ;-)

Fair enough.
History
Date User Action Args
2009-01-05 10:44:27lemburgsetrecipients: + lemburg, pitrou, vstinner, ebfe
2009-01-05 10:44:26lemburglinkissue4757 messages
2009-01-05 10:44:25lemburgcreate