On 4/29/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Python 2.3.5 (#2, Mar 6 2006, 10:12:24) > [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > py> import locale > py> locale.setlocale(locale.LC_ALL, "") > '[EMAIL PROTECTED]' > py> löwis=1 > py> print löwis > 1
But a file with "löwis=1" in it causes a syntax error (even if an encoding is specified). I believe this is a quirk of interactive mode only. Certainly the language spec doesn't intend to allow this. > > I do think that *eventually* we'll have to support this. But I don't > > think Python needs to lead the pack here; I don't think the tools are > > ready yet. > > Python doesn't really lead here. The C family of languages (C, C++, > Java, C#) all have Unicode identifiers, so there is plenty of > experience. Primarily, the experience is that the feature isn't > used much, because of obstacles I think we can overcome (primarily, > that all these languages make the source encoding > implementation-defined; we don't, as we put the source encoding into > the source file). I still think it's premature. In any case, it doesn't strike me as something that needs to be synchronized with Py3k -- it could be introduced earlier or later since it introduces no backwards compatibility. Python can respond much more agile here than most other languages. I can also see this as a Jython or IronPython "language extension" -- after all, if Java and C# support unicode identifiers e.g. for class names, there will be a need to support importing those classes... That way some experience can be gained. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
