Marc-Andre Lemburg <m...@egenix.com> added the comment: On 2009-01-04 23:51, STINNER Victor wrote: > STINNER Victor <victor.stin...@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. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com