Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'much!': 0.05; 'pep': 0.09; 'cc:addr:python-list': 0.11; '"a"': 0.16; '(letter': 0.16; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'identifier.': 0.16; 'subject:unicode': 0.16; 'underscore.': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'cc:addr:python.org': 0.22; 'number)': 0.24; 'unicode': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; '(this': 0.29; 'explained': 0.31; 'false': 0.36; 'thanks': 0.36; "i'll": 0.36; 'should': 0.36; 'extended': 0.61; 'name': 0.63; '(that': 0.65; 'to:addr:gmail.com': 0.65; 'chinese': 0.74; 'characters,': 0.84; 'received:50.22': 0.84 Date: Tue, 25 Mar 2014 15:29:41 -0500 From: Tim Chase To: Mark H Harris Subject: Re: unicode as valid naming symbols In-Reply-To: <5331D902.3030902@gmail.com> References: <5331D902.3030902@gmail.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395779371 news.xs4all.nl 2835 [2001:888:2000:d::a6]:33167 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69067 On 2014-03-25 14:29, Mark H Harris wrote: > > It's explained in PEP 3131. > > > > Basically, a name should to start with a letter (this has been > > extended to include Chinese characters, etc) or an underscore. > > > > =CE=BB is a classified as Lowercase_Letter. > > > > =E2=88=9A is classified as Math_Symbol. =20 >=20 > Thanks much! I'll note that for improvements. Any unicode > symbol (that is not a number) should be allowed as an identifier. It's not just about number'ness: >>> letter =3D "a" >>> number =3D "2" >>> letter.isidentifier() True >>> number.isidentifier() False >>> (letter + number).isidentifier() True -tkc