Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'operator': 0.03; 'syntax': 0.04; 'mrab': 0.05; 'root': 0.05; 'identifier': 0.09; 'operator,': 0.09; 'language.': 0.14; '"in"': 0.16; '"is"': 0.16; '(product': 0.16; 'backward': 0.16; 'division.': 0.16; 'identifiers.': 0.16; 'integers.': 0.16; 'keyword.': 0.16; 'notation': 0.16; 'operator.': 0.16; 'prohibit': 0.16; 'subject:unicode': 0.16; 'values:': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'possible,': 0.19; 'skip:f 30': 0.19; 'seems': 0.21; '(the': 0.22; 'example': 0.22; 'programming': 0.22; 'closely': 0.24; 'mathematical': 0.24; 'unicode': 0.24; 'initial': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'generally': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'argue': 0.31; 'constant': 0.31; 'operators': 0.31; 'something': 0.35; 'received:google.com': 0.35; 'acceptable': 0.36; 'keyword': 0.36; 'changing': 0.37; 'positive': 0.37; 'too': 0.37; 'convention': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'release': 0.40; 'even': 0.60; 'course': 0.61; 'kind': 0.63; 'such': 0.63; 'become': 0.64; 'more': 0.64; 'taking': 0.65; 'mar': 0.68; '26,': 0.68; 'introduce': 0.78; '8.2': 0.84; 'pardon': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=hRyQzUh1LAXkjJGJv5YJU8Fp+AbScpML5uJualC0+WM=; b=Pi0qS9iq/chvwZrow3ZxecfAzPg7NKWVkl8IJfC4XfSztCSALjG1+KhU0GaLxUhXJ+ jNxYThk1IekAf33CwKHgxWw/s0rnW+45QWMqFRBE6s8T1W0mN4fA8ZtAty03nC5exo2v Ixra4JBvPnw6FNXbPbKWH1AqzUTgas6cb9l3Wp3oGpxrao802jRzNlECtcFVdHN8sVMr +EwLUZsPm7FBPUhN/+rAB3moASpem7PsrqaR50VIwtmmTFN6UwnLCgS9gofACVuLnfr/ nF+ozt4ym6lNEXJu7HRZrN/b875V4SHVIBgddkCcPAK8wnSeNV/yN6pTBpy3ObbgXWib fRhQ== X-Received: by 10.66.146.105 with SMTP id tb9mr4848344pab.157.1395851880036; Wed, 26 Mar 2014 09:38:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53329549.1000208@rece.vub.ac.be> References: <5331D902.3030902@gmail.com> <53320793.8070501@stoneleaf.us> <533241C0.8020109@mrabarnett.plus.com> <53329549.1000208@rece.vub.ac.be> From: Ian Kelly Date: Wed, 26 Mar 2014 10:37:19 -0600 Subject: Re: unicode as valid naming symbols To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395851889 news.xs4all.nl 2838 [2001:888:2000:d::a6]:34892 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69137 On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon wrote: > On 26-03-14 03:56, MRAB wrote: >> Or as a root operator, e.g. 3 =E2=88=9A x (the cube root of x). >> > Personally I would think such an operator is too limited to include in a = programming language. > This kind of notation is only used with a constant to indicate what kind = of root is taken and > only with positive integers. Something like the equivallent of the follow= ing I have never seen. > > t =3D 2.5 > x =3D 8.2 > y =3D t =E2=88=9A x An example is taking the geometric mean of an arbitrary number of values: product =3D functools.reduce(operator.mul, values, 1) n =3D len(values) geometric_mean =3D n =E2=88=9A product I might argue though for the inverted syntax (product =E2=88=9A n) to more closely parallel division. > Of course we don't have to follow mathematical convention with python. Ho= wever allowing any > unicode symbol as an identifier doesn't prohibit from using =E2=88=9A as = an operator. We do have > "in" and "is" as operators now, even if they would otherwise be acceptabl= e identifiers. > So I wonder, would you consider to introduce log as an operator. 2 log x = seems an interesting > operation for a programmer. If it's going to become an operator, then it has to be a keyword. Changing a token that is currently allowed to be an identifier into a keyword is generally avoided as much as possible, because it breaks backward compatibility. "in" and "is" have both been keywords for a very long time, perhaps since the initial release of Python.