Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #111008
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Well, I finally ran into a Python Unicode problem, sort of |
| Date | Sun, 3 Jul 2016 20:41:48 +0100 |
| Lines | 37 |
| Message-ID | <mailman.44.1467575110.2295.python-list@python.org> (permalink) |
| References | <0589521b-648a-47c1-8afa-6f746e0fb901@googlegroups.com> <CAPTjJmpXygTHwzMzPFtU96eanS_0GQvo1L4cYgEfqUa_HfGSOQ@mail.gmail.com> <mailman.36.1467531722.2295.python-list@python.org> <28f1731b-438b-47a4-be7b-ef9ab6314394@googlegroups.com> <b86c4f8c-bdf8-8bcb-b1f6-d564ba8a1ac3@mrabarnett.plus.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de 6o/11CTKr3jSjcsyHHoqtAAR7CW/8BbSlW6wp0RGaQUw== |
| Return-Path | <python@mrabarnett.plus.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'non-ascii': 0.09; 'oh,': 0.09; 'subject:into': 0.09; 'python': 0.10; 'question.': 0.13; '2016': 0.16; 'available...': 0.16; 'exponent': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'identifiers,': 0.16; 'identifiers.': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'operators.': 0.16; 'permits': 0.16; 'programmers.': 0.16; 'python-based': 0.16; 'received:192.168.1.4': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Unicode': 0.16; 'such,': 0.16; 'variable.': 0.16; 'wrote:': 0.16; 'variable': 0.18; 'language': 0.19; 'saying': 0.22; "aren't": 0.22; 'mind.': 0.22; 'plus.': 0.22; 'satisfying': 0.22; 'subject:problem': 0.22; 'bit': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'operators': 0.29; 'symbols': 0.29; 'character': 0.29; 'read,': 0.29; "i'm": 0.30; 'mention': 0.30; 'certain': 0.31; 'another': 0.32; 'table': 0.32; 'url:python': 0.33; "i'll": 0.33; 'definition': 0.34; 'equal': 0.34; 'this?': 0.34; 'that,': 0.34; 'could': 0.35; 'besides': 0.35; 'unicode': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'url:org': 0.36; 'assigned': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'agree': 0.37; 'starting': 0.37; 'someone': 0.38; 'why': 0.39; 'sure': 0.39; 'easily': 0.39; 'received:192': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'easy': 0.60; 'url:3': 0.60; 'john': 0.61; 'reach': 0.61; 'here.': 0.62; 'leaving': 0.63; 'more': 0.63; 'here:': 0.63; 'debate': 0.66; 'cut': 0.67; 'jul': 0.72; 'question!': 0.84; 'this...': 0.84; 'utc-7,': 0.84; 'url:reference': 0.91; 'grey': 0.93 |
| X-CM-Score | 0.00 |
| X-CNFS-Analysis | v=2.2 cv=J7fo10vS c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=IkcTkHD0fZMA:10 a=8AHkEIZyAAAA:8 a=J1sBgcoqRRaAWxGzCY4A:9 a=wbMVinzq_CDyKlsa:21 a=uaM8VHATBzkY-ouO:21 a=4NdJUZNqX0cA:10 a=7K4yPEzc-uA7A4xFz8XL:22 |
| X-AUTH | mrabarnett@:2500 |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
| In-Reply-To | <28f1731b-438b-47a4-be7b-ef9ab6314394@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 | <b86c4f8c-bdf8-8bcb-b1f6-d564ba8a1ac3@mrabarnett.plus.com> |
| X-Mailman-Original-References | <0589521b-648a-47c1-8afa-6f746e0fb901@googlegroups.com> <CAPTjJmpXygTHwzMzPFtU96eanS_0GQvo1L4cYgEfqUa_HfGSOQ@mail.gmail.com> <mailman.36.1467531722.2295.python-list@python.org> <28f1731b-438b-47a4-be7b-ef9ab6314394@googlegroups.com> |
| Xref | csiph.com comp.lang.python:111008 |
Show key headers only | View raw
On 2016-07-03 19:39, John Ladasky wrote: > On Sunday, July 3, 2016 at 12:42:14 AM UTC-7, Chris Angelico wrote: >> On Sun, Jul 3, 2016 at 4:58 PM, John Ladasky wrote: > >> Very good question! The detaily answer is here: >> >> https://docs.python.org/3/reference/lexical_analysis.html#identifiers >> >> > A philosophical question. Why should any character be excluded from a variable name, besides the fact that it might also be an operator? >> >> In a way, that's exactly what's happening here. Python permits certain >> categories of character as identifiers, leaving other categories >> available for operators. Even though there aren't any non-ASCII >> operators in a vanilla CPython, it's plausible that someone could >> create a Python-based language with more operators (eg ≠ NOT EQUAL TO >> as an alternative to !=), and I'm sure you'd agree that saying "≠ = 1" >> is nonsensical. > > I agree that there are some characters in the Unicode definition that could (should?) be operators and, as such, disallowed in identifiers. "≠", "≥" and "√" come to mind. I don't know whether the Unicode "character properties" are assigned to the characters in a way that would be satisfying to the needs of programmers. I'll do some reading. > >> Symbols like that are a bit of a >> grey area, so you may find that you're starting a huge debate :) > > Oh, I can see that debate coming. I know that not all of these characters are easily TYPED, and so I have to reach for a Unicode table to cut and paste them. But once but and pasted, they are easily READ, and that's a big plus. > > Here's another worm for the can. Would you rather read this... > > d = sqrt(x**2 + y**2) > > ...or this? > > d = √(x² + y²) > It's easy to read something as simple like that, but it's harder when the exponent is more than a number or a variable. And what about a**b**c? Not to mention the limited number of superscript codepoints available...
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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