Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #111021

Re: Well, I finally ran into a Python Unicode problem, sort of

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From eryk sun <eryksun@gmail.com>
Newsgroups comp.lang.python
Subject Re: Well, I finally ran into a Python Unicode problem, sort of
Date Sun, 3 Jul 2016 23:46:26 +0000
Lines 29
Message-ID <mailman.50.1467589634.2295.python-list@python.org> (permalink)
References <0589521b-648a-47c1-8afa-6f746e0fb901@googlegroups.com> <CACL+1au8==WBQScKWFMwoYEFU27XbSi_ywJod+na-BdHLcUaJg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de 2jFeUCeisBCZq4VOAHCYTAnf2GHXlMcoMsNNArpyBiAw==
Return-Path <eryksun@gmail.com>
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; 'operator': 0.03; 'subject:Python': 0.05; 'added.': 0.09; 'non-ascii': 0.09; 'subject:into': 0.09; 'throws': 0.09; 'example:': 0.10; 'python': 0.10; 'interpreter': 0.15; '2016': 0.16; '465': 0.16; 'naming': 0.16; 'operators.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Unicode': 0.16; 'user-defined': 0.16; 'wrote:': 0.16; 'mechanism': 0.18; 'language': 0.19; '>>>': 0.20; 'names.': 0.22; 'parsing': 0.22; 'subject:problem': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'message- id:@mail.gmail.com': 0.27; 'mathematical': 0.27; 'function': 0.28; 'operators': 0.29; 'pep': 0.29; 'url:peps': 0.29; 'character': 0.29; 'option': 0.31; 'table': 0.32; 'maybe': 0.33; 'url:python': 0.33; 'symbol': 0.33; 'add': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'url:dev': 0.35; "isn't": 0.35; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'itself': 0.38; 'to:addr:python.org': 0.40; 'john': 0.61; 'skip:n 10': 0.62; 'products.': 0.70; 'jul': 0.72; 'encounters': 0.84; 'lacks': 0.84; 'ruled': 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-transfer-encoding; bh=6Xr6HF5pw1hpTepZ5B2r+QBtm2T1BVIZhjHZnRtzbUg=; b=wS2KVa8BBd89LMHOYl5qM58jokJJLuvgzZB9m+1gzeVnIbOPNpnt4CaoNNlKYCvwwR pOXU6AbS+8Flavga39nvIqQ0ly4T1HhBrhXLDG5V0irMDX8pBsUK+tUdP4GXVsPVo0UB GtUjhBlHciQcI4hN04GQfVZ8BQYz1CIicsP2G3Gd8Hkl3I6HVxgmKMq2mPWIY6Fl249r Nl00CtnJZ+f/FMxLRxwd5vCf9r+4WzOqrjCUfV/wLdYp1c0nhWlYc8KvAOWy6zW+uFH+ rzWbw1xp3WEFSsok/P2kNdjSSK1uXWcPVX1Zxfvuz7fBO/xjGgQ0BKUI793RIoSRr8Yn eIzg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=6Xr6HF5pw1hpTepZ5B2r+QBtm2T1BVIZhjHZnRtzbUg=; b=dHAMqaON0VCK9BiTPfFFQ0jrihqqjhfPNzEIlyTXwO0kRcbZL4oKO+FGfBi/ARIc8R Y4bHm9KgX8XBN/rBaycm46dXS5S7jdd0AF89zIsekEntXcELS6NRpofOkgZI9sA86Ed7 a5wDf04xW4mp/+uR2AItiO9RHaEUOfxSs+iC0cU5gQNf0QApAKf7DFv0x5u7DhLDpBD9 x4HyrFPNyxWPV1oB0KQLXVXh8pghmxzJwK3iECKABRtuP1dAplJx64k09EKFb7ypP6eI /mPqF2cTSNWLmC/tJMDk4rPHaBgORUzEAMUrkp9Gmec7hLZXEaGmwTg6Hgs+KC5sXiF0 nvjw==
X-Gm-Message-State ALyK8tJBTiyrMS3GG+eURImB5P5C8DiZwPTcsFPAIPlU/7YoiD0AGQl0j90SIXu4eHxh1skxzT9xqeOIYkYAwA==
X-Received by 10.36.65.28 with SMTP id x28mr1797406ita.16.1467589625944; Sun, 03 Jul 2016 16:47:05 -0700 (PDT)
In-Reply-To <0589521b-648a-47c1-8afa-6f746e0fb901@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CACL+1au8==WBQScKWFMwoYEFU27XbSi_ywJod+na-BdHLcUaJg@mail.gmail.com>
X-Mailman-Original-References <0589521b-648a-47c1-8afa-6f746e0fb901@googlegroups.com>
Xref csiph.com comp.lang.python:111021

Show key headers only | View raw


On Sun, Jul 3, 2016 at 6:58 AM, John Ladasky <john_ladasky@sbcglobal.net> wrote:
> The nabla symbol (∇) is used in the naming of gradients. Python isn't having it.
> The interpreter throws a "SyntaxError: invalid character in identifier" when it
> encounters the ∇.

Del is a mathematical operator to take the gradient. It's not part of
the name. For `∇f`, the operator is `∇` and the function name is `f`.
Python lacks a mechanism to add user-defined operators. (R has this
capability.) Maybe this feature could be added. To make parsing
simple, user-defined operators could be limited to non-ASCII symbol
characters (math and other -- Sm, So). That simple option is off the
table if we allow symbol characters in names.

Adding an operator to the language itself requires a PEP. Recently PEP
465 added an `@` operator for matrix products. For example:

    >>> x = np.array([1j, 1])
    >>> x @ x
    0j
    >>> x @ x.conj() # Hermitian inner product
    (2+0j)

Note that using a non-ASCII operator was ruled out:

http://legacy.python.org/dev/peps/pep-0465/#choice-of-operator

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Well, I finally ran into a Python Unicode problem, sort of John Ladasky <john_ladasky@sbcglobal.net> - 2016-07-02 23:58 -0700
  Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 00:07 -0700
    Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-03 10:26 +0300
      Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 01:38 -0700
        Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-03 12:01 +0300
          Re: Well, I finally ran into a Python Unicode problem, sort of Chris Angelico <rosuav@gmail.com> - 2016-07-04 01:14 +1000
          Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 14:21 -0700
    Re: Well, I finally ran into a Python Unicode problem, sort of John Ladasky <john_ladasky@sbcglobal.net> - 2016-07-03 09:24 -0700
  Re: Well, I finally ran into a Python Unicode problem, sort of Rustom Mody <rustompmody@gmail.com> - 2016-07-03 00:26 -0700
  Re: Well, I finally ran into a Python Unicode problem, sort of Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-03 10:29 +0300
    Re: Well, I finally ran into a Python Unicode problem, sort of Robert Kern <robert.kern@gmail.com> - 2016-07-03 10:16 +0100
  Re: Well, I finally ran into a Python Unicode problem, sort of Chris Angelico <rosuav@gmail.com> - 2016-07-03 17:41 +1000
    Re: Well, I finally ran into a Python Unicode problem, sort of John Ladasky <john_ladasky@sbcglobal.net> - 2016-07-03 11:39 -0700
      Re: Well, I finally ran into a Python Unicode problem, sort of MRAB <python@mrabarnett.plus.com> - 2016-07-03 20:41 +0100
      Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 14:28 -0700
        Re: Well, I finally ran into a Python Unicode problem, sort of Steven D'Aprano <steve@pearwood.info> - 2016-07-04 12:33 +1000
          Re: Well, I finally ran into a Python Unicode problem, sort of Rustom Mody <rustompmody@gmail.com> - 2016-07-03 22:14 -0700
            Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-04 01:11 -0700
              Re: Well, I finally ran into a Python Unicode problem, sort of Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-04 13:10 +0300
              Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-04 12:04 +0300
            Re: Well, I finally ran into a Python Unicode problem, sort of Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-04 09:08 +0300
  Re: Well, I finally ran into a Python Unicode problem, sort of Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2016-07-03 11:53 +0200
    Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-03 14:01 +0300
      Re: Well, I finally ran into a Python Unicode problem, sort of Christian Gollwitzer <auriocus@gmx.de> - 2016-07-03 13:16 +0200
        Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-03 14:22 +0300
          Re: Well, I finally ran into a Python Unicode problem, sort of Christian Gollwitzer <auriocus@gmx.de> - 2016-07-03 16:05 +0200
            Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-03 17:39 +0300
          Re: Well, I finally ran into a Python Unicode problem, sort of Random832 <random832@fastmail.com> - 2016-07-03 16:49 -0400
            Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-04 00:25 +0300
      Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-03 12:50 +0100
        Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 14:26 -0700
  Re: Well, I finally ran into a Python Unicode problem, sort of eryk sun <eryksun@gmail.com> - 2016-07-03 23:46 +0000
    Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 17:00 -0700
      Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 01:17 +0100
        Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 17:24 -0700
          Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 01:39 +0100
            Re: Well, I finally ran into a Python Unicode problem, sort of Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-07-03 18:15 -0700
              Re: Well, I finally ran into a Python Unicode problem, sort of Random832 <random832@fastmail.com> - 2016-07-03 22:20 -0400
              Re: Well, I finally ran into a Python Unicode problem, sort of Rustom Mody <rustompmody@gmail.com> - 2016-07-04 05:16 -0700
              Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 11:26 +0100
        Re: Well, I finally ran into a Python Unicode problem, sort of Steven D'Aprano <steve@pearwood.info> - 2016-07-04 12:30 +1000
          Re: Well, I finally ran into a Python Unicode problem, sort of Ned Batchelder <ned@nedbatchelder.com> - 2016-07-04 05:47 -0700
            Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 15:36 +0100
              Re: Well, I finally ran into a Python Unicode problem, sort of Ned Batchelder <ned@nedbatchelder.com> - 2016-07-04 07:46 -0700
                Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 17:16 +0100
                Re: Well, I finally ran into a Python Unicode problem, sort of Marko Rauhamaa <marko@pacujo.net> - 2016-07-04 19:44 +0300
          Re: Well, I finally ran into a Python Unicode problem, sort of BartC <bc@freeuk.com> - 2016-07-04 11:05 +0100
            Re: Well, I finally ran into a Python Unicode problem, sort of Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-07-04 13:26 +0300
      Re: Well, I finally ran into a Python Unicode problem, sort of Random832 <random832@fastmail.com> - 2016-07-03 22:16 -0400

csiph-web