Re: [Python-ideas] Allow additional separator character in variables

2017-11-26 Thread Stephen J. Turnbull
Steven D'Aprano writes: > Either my google-fu is failing or your memory failed you. I'm still pretty sure that it's the google-fu, but I confess my google-fu failed me too. In either case, you have my deepest apologies for the unprofitable hour-and-a-half. Steve

Re: [Python-ideas] Allow additional separator character in variables

2017-11-25 Thread Mikhail V
Just for the record, there is also another hyphen, called "soft hyphen", U+00AD. Main difference is that in some software it is an 'interpreted' symbol, and thus may simply disappear from the screen in such software, so it cannot be surely defined as a printable character. OTOH the benefit is that

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread MRAB
On 2017-11-24 00:49, Steven D'Aprano wrote: On Thu, Nov 23, 2017 at 02:24:16PM +0900, Stephen J. Turnbull wrote: Alex Martelli wrote a couple of interesting posts about his experiences with multilingual comments back in the discussion of PEP 263. One of them involved a team from Israel, I

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Steven D'Aprano
On Thu, Nov 23, 2017 at 02:24:16PM +0900, Stephen J. Turnbull wrote: > Alex Martelli wrote a couple of interesting posts about his > experiences with multilingual comments back in the discussion of PEP > 263. One of them involved a team from Israel, I think, or maybe South > Africa. If you

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Steven D'Aprano
On Thu, Nov 23, 2017 at 02:29:43PM +, Carl Smith wrote: > Can't we just tell everyone to speak US English, and go back to ASCII? It > would be a less painful migration. I trust you're joking, but it makes me twitchy to see people saying that even in jest, because I've come across folks who

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Stephan Houben
US English is too broad. I propose everybody talk like in the "Dallas" TV series and wear mandatory cowboy hats. (Or was this mail just a dream?) Stephan 2017-11-23 15:29 GMT+01:00 Carl Smith : > Can't we just tell everyone to speak US English, and go back to ASCII? It

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Carl Smith
Can't we just tell everyone to speak US English, and go back to ASCII? It would be a less painful migration. -- Carl Smith carl.in...@gmail.com On 23 November 2017 at 14:16, Chris Angelico wrote: > On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: > >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 1:10 AM, Mikhail V wrote: > Well, then there is some bitter irony in this, so it allows pretty > much everything, > but does not allow me to beautify code with hyphens. > I can fully understand the wish to use non-latin scripts in strings or >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-23 Thread Mikhail V
On Thu, Nov 23, 2017 at 4:46 AM, Nick Coghlan wrote: > On 21 November 2017 at 21:55, Stephen J. Turnbull > wrote: >> >> Personally, I think that Python probably should ban non-ASCII >> non-letter characters in identifiers and whitespace,

Re: [Python-ideas] Allow additional separator character in variables

2017-11-22 Thread Nick Coghlan
On 23 November 2017 at 16:34, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Nick Coghlan writes: > > > We're not going to start second-guessing the Unicode Consortium on this > > point - human languages are complicated, and we don't have any special > > insight on this

Re: [Python-ideas] Allow additional separator character in variables

2017-11-22 Thread Stephen J. Turnbull
Nick Coghlan writes: > We're not going to start second-guessing the Unicode Consortium on this > point - human languages are complicated, and we don't have any special > insight on this point that they don't. Agreed. Python, however, is NOT a (natural) human language, and the Unicode

Re: [Python-ideas] Allow additional separator character in variables

2017-11-22 Thread Stephen J. Turnbull
Mikhail V writes: > A single word written in local language should not. But its a perfect way > to make whole code look like a mess. Alex Martelli wrote a couple of interesting posts about his experiences with multilingual comments back in the discussion of PEP 263. One of them involved a

Re: [Python-ideas] Allow additional separator character in variables

2017-11-22 Thread Nick Coghlan
On 21 November 2017 at 21:55, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Personally, I think that Python probably should ban non-ASCII > non-letter characters in identifiers and whitespace, and maybe add > them later in response to requests from native speakers of the >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-21 Thread Serhiy Storchaka
21.11.17 22:03, Stephan Houben пише: If anybody is still worried about this, here is a 29-line proof-of-concept code checker which warns if your source file contains identifiers which are different but look the same. https://gist.github.com/stephanh42/61eceadc2890cf1b53ada5e48ef98ad1 Ha! I

Re: [Python-ideas] Allow additional separator character in variables

2017-11-21 Thread Stephan Houben
Hi all, If anybody is still worried about this, here is a 29-line proof-of-concept code checker which warns if your source file contains identifiers which are different but look the same. https://gist.github.com/stephanh42/61eceadc2890cf1b53ada5e48ef98ad1 Stephan 2017-11-21 19:19 GMT+01:00

Re: [Python-ideas] Allow additional separator character in variables

2017-11-21 Thread Mikhail V
Serhiy Storchaka wrote: > Yes, it causes less confusion that changing meaning of a minus. If those chars are not used at all, then yes :) And I don't recall I was exactly propsing changing meaning of minus > But the name моязмінна doesn't cause any confusion if used in an > appropriate context

Re: [Python-ideas] Allow additional separator character in variables

2017-11-21 Thread Stephan Houben
2017-11-21 12:55 GMT+01:00 Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp>: > Personally, I think that Python probably should ban non-ASCII > non-letter characters in identifiers and whitespace, and maybe add > them later in response to requests from native speakers of the > relevant

Re: [Python-ideas] Allow additional separator character in variables

2017-11-20 Thread Serhiy Storchaka
21.11.17 05:16, Mikhail V пише: my·variable myᝍvariable myㅡvariable myⵧvariable myㄧvariable myㆍvariable ^ Is this good idea *for Python*? I mean this is not Python that I knew. I don't know how it is possible. Looks like a result of some unlucky nuclear experment. Might be it will not cause any

Re: [Python-ideas] Allow additional separator character in variables

2017-11-20 Thread Mikhail V
On Tue, Nov 21, 2017 at 2:51 AM, Stephen J. Turnbull wrote: > Mikhail V writes: > > > On Mon, Nov 20, 2017 at 5:46 AM, Guido van Rossum wrote: > > > Please kill this thread. > > > > So the idea is too bad? > > No, the idea is *not* bad,

Re: [Python-ideas] Allow additional separator character in variables

2017-11-20 Thread Stephen J. Turnbull
Mikhail V writes: > On Mon, Nov 20, 2017 at 5:46 AM, Guido van Rossum wrote: > > Please kill this thread. > > So the idea is too bad? No, the idea is *not* bad, it's just not for Python. As has been true for every one of your ideas for language tweaks that I can recall.

Re: [Python-ideas] Allow additional separator character in variables

2017-11-20 Thread Nikolaus Rath
On Nov 18 2017, Bruce Leban wrote: > And because spaces between words is mostly not valid syntax currently, this > change would be easier to introduce than breaking every single program out > there by re-purposing hyphen-minus. But I'm not seriously proposing

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Mikhail V
On Mon, Nov 20, 2017 at 5:46 AM, Guido van Rossum wrote: > Please kill this thread. So the idea is too bad? ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct:

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Bruce Leban
On Sun, Nov 19, 2017 at 4:18 PM, Mikhail V wrote: > Bruce Leban wrote: > > > It is not a misfortune or even true that Python uses hyphen for minus. > > The name of the character used in Python is HYPHEN-MINUS. > > This is pure demagogy, name it HYPHEN-MINUS-TINYDASH if you

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread MRAB
On 2017-11-20 00:20, Chris Angelico wrote: On Mon, Nov 20, 2017 at 11:01 AM, Mikhail V wrote: 1. The future versions of syntax, ideally, must allow ONLY minus U2212 for the minus operator, and allow hyphens 002D in identifiers. Since it is impossible to the current

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Chris Angelico
On Mon, Nov 20, 2017 at 11:18 AM, Mikhail V wrote: > Bruce Leban wrote: > >> It is not a misfortune or even true that Python uses hyphen for minus. >> The name of the character used in Python is HYPHEN-MINUS. > > This is pure demagogy, name it HYPHEN-MINUS-TINYDASH if you

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Chris Angelico
On Mon, Nov 20, 2017 at 11:01 AM, Mikhail V wrote: > 1. The future versions of syntax, ideally, must allow ONLY minus U2212 for > the minus operator, and allow hyphens 002D in identifiers. Since it is > impossible > to the current moment, I must think out the least painful

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Mikhail V
Bruce Leban wrote: > It is not a misfortune or even true that Python uses hyphen for minus. > The name of the character used in Python is HYPHEN-MINUS. This is pure demagogy, name it HYPHEN-MINUS-TINYDASH if you like, but what aspect of reality does it change apart of its name? "Hyphen-minus"

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Mikhail V
On Sun, Nov 19, 2017 at 5:16 AM, Nick Coghlan wrote: > On 19 November 2017 at 13:22, Mikhail V wrote: >> For me, one "cheap" solution against underscores is to use >> syntax highlighting which grays them out, but if those become like >> spaces, then it

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Greg Ewing
Mikhail V wrote: In reality, hyphen and Minus sign are not even closely similar - Minus is ca. twice as wide, If you are using a font that distinguishes them that clearly, and if the human reader is sufficiently typographically aware to notice the distinction. Both of those are big ifs. And

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Greg Ewing
In summary, this proposal seems to be: Give two visually indistinguishible characters different meanings to improve readability. I'm not sure, but something about that sentence doesn't seem quite right. -- Greg ___ Python-ideas mailing list

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Richard Damon
On 11/19/17 1:33 AM, Steve Barnes wrote: How about allowing ¬, (ASCII 172, U+00ac, NOT sign), in variable names as in my¬variable - it has the advantages that: There is NO such character in ASCII. ASCII is a 7 bit character set, and no ASCII code has a value bigger than 127. There are a

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Steve Barnes
On 19/11/2017 11:20, Stephan Houben wrote: > You think that's bad? > https://github.com/reinderien/mimic/blob/master/README.md > Abandon all hope ye who use Unicode. > > Op 19 nov. 2017 12:06 schreef "Antoine Pitrou"

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Stephan Houben
You think that's bad? https://github.com/reinderien/mimic/blob/master/README.md Abandon all hope ye who use Unicode. Op 19 nov. 2017 12:06 schreef "Antoine Pitrou" : > On Sun, 19 Nov 2017 09:38:17 +0200 > Serhiy Storchaka > wrote: > > 19.11.17 04:01,

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Antoine Pitrou
On Sun, 19 Nov 2017 09:38:17 +0200 Serhiy Storchaka wrote: > 19.11.17 04:01, Mikhail V пише: > > Python allows underscore character as a separator in variables. > > This is better than nothing, still it does not make the look much better. > > > > **Proposal**: allow

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Stephan Houben
There is an unfortunate ambiguity in using a character that means "not" as a word separator: nuke.do¬launch() "But... I called the method which explicitly did *not* launch the nuke!" Stephan Op 19 nov. 2017 11:05 schreef "Steve Barnes" : On 19/11/2017 05:01, Nick

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Steve Barnes
On 19/11/2017 05:01, Nick Timkovich wrote: > Python does not use U+2010 HYPHEN for the minus operator, it uses the > U+002D (-) HYPHEN-MINUS. > > In some monospace fonts, there is a subtle difference between U+002D, > U+2013 EN DASH, and U+2014 EM DASH, but it's usually hard to tell them >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-19 Thread Nick Timkovich
I guess for reference: exec('a\N{MIDDLE DOT} = 0') exec('\N{BUHID LETTER RA} = 1') exec('\N{HANGUL LETTER EU} = 2') exec('\N{TIFINAGH LETTER YO} = 3') exec('\N{BOPOMOFO LETTER I} = 4') exec('\N{HANGUL LETTER ARAEA} = 5') On Sun, Nov 19, 2017 at 1:38 AM, Serhiy Storchaka

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Stephan Houben
Note that Python already allows Unicode characters from class "connector punctuations (Pc)" in identifiers. No dashes in that, but if you are into that kind of thing, then this⁀is⁀a⁀valid⁀identifier . Stephan Op 19 nov. 2017 08:13 schreef "Bruce Leban" : > > On Sat, Nov 18,

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Serhiy Storchaka
19.11.17 04:01, Mikhail V пише: Python allows underscore character as a separator in variables. This is better than nothing, still it does not make the look much better. **Proposal**: allow additional separator, namely hyphen character. You already can use "separators" different from the

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Bruce Leban
On Sat, Nov 18, 2017 at 8:44 PM, Mikhail V wrote: > > > That seems to be another showcase of misfotune that Python > uses hyphen for minus operator. I know it is not language designer's > fault, because basic ASCII simply did not not include minus character. > But do you

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Nick Timkovich
Python does not use U+2010 HYPHEN for the minus operator, it uses the U+002D (-) HYPHEN-MINUS. In some monospace fonts, there is a subtle difference between U+002D, U+2013 EN DASH, and U+2014 EM DASH, but it's usually hard to tell them *all* apart. If you want to make a proposal, I'd suggest

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Mikhail V
On Sun, Nov 19, 2017 at 3:42 AM, Nick Coghlan wrote: > For anyone tempted to suggest "What about multiple underscores > indicating continuation of the variable name?", that's still a > compatibility problem due to the unary minus operator: > > >>> my--variable > 2 >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Nick Coghlan
On 19 November 2017 at 13:22, Mikhail V wrote: > For me, one "cheap" solution against underscores is to use > syntax highlighting which grays them out, but if those become like > spaces, then it becomes a bit confusing, e.g. in function with many arguments. > Also,

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Mikhail V
Chris A wrote: > Both of these create extremely confusing situations, where two > nearly-identical symbols have completely different meanings. In reality, hyphen and Minus sign are not even closely similar - Minus is ca. twice as wide, however the citizens of the Monospaced Kingdom may disagree ;

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Nick Coghlan
On 19 November 2017 at 12:32, Nick Coghlan wrote: > On 19 November 2017 at 12:01, Mikhail V wrote: >> Python allows underscore character as a separator in variables. >> This is better than nothing, still it does not make the look much better. >> >>

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Nick Coghlan
On 19 November 2017 at 12:01, Mikhail V wrote: > Python allows underscore character as a separator in variables. > This is better than nothing, still it does not make the look much better. > > **Proposal**: allow additional separator, namely hyphen character. Regardless of

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Chris Angelico
On Sun, Nov 19, 2017 at 1:01 PM, Mikhail V wrote: > Python allows underscore character as a separator in variables. > This is better than nothing, still it does not make the look much better. > > **Proposal**: allow additional separator, namely hyphen character. > >

Re: [Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Antoine Rozo
What will the hyphen bring to what is already allowed with underscore? It is not possible to break compatibility with '-' character. 2017-11-19 3:01 GMT+01:00 Mikhail V : > Python allows underscore character as a separator in variables. > This is better than nothing, still

[Python-ideas] Allow additional separator character in variables

2017-11-18 Thread Mikhail V
Python allows underscore character as a separator in variables. This is better than nothing, still it does not make the look much better. **Proposal**: allow additional separator, namely hyphen character. **Benefits**: this should provide significant readability improvement. Compared to most