[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
On 5/21/2020 5:51 PM, Thierry Parmentelat wrote: >> >> >> Python-arrow.png > > that’s nice ! it’s a real shame though, and a bit of a waste honestly, that > everybody needs to cook their own brew of an editor to get there > and primarily all I’m trying to say is that, one day, this will be a legal

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Cameron Simpson
On 21May2020 21:30, Rob Cliffe wrote: On 21/05/2020 14:50, Steve Barnes wrote: The issue is simple and simple enough for a beginner to fall foul of - test procedure: Change directory to any directory with files in totally a few 10s of megs (ideally but it doesn't matter much). python -m zipfi

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Steven D'Aprano
On Thu, May 21, 2020 at 04:04:20PM +0200, Thierry Parmentelat wrote: > for all the rest, I am sorry, all the arguments about people having > trouble inputing those characters are not relevant, it’s not as if > using unicode characters was mandatory If we still have to come up with a good lookin

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread David Mertz
On Thu, May 21, 2020, 5:51 PM Thierry Parmentelat < thierry.parmente...@inria.fr> wrote: > You are SERIOUSLY suggesting that typing 'Ctrl-Shift-U 2 1 9 2 ' is > easier for me than typing '->' as I do now!? > > that’s not how I’d do it; and I dont think I said or suggested anything to > that effect

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21 May 2020, at 23:03, David Mertz wrote: > > You are SERIOUSLY suggesting that typing 'Ctrl-Shift-U 2 1 9 2 ' is > easier for me than typing '->' as I do now!? that’s not how I’d do it; and I dont think I said or suggested anything to that effect > And it remains easier if I use a dif

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Rhodri James
On 21/05/2020 22:11, Mike Miller wrote: The only thing I've seen recently that doesn't is the Linux console, which I use rarely for admin tasks.  (Oddly enough, it does handle right arrow properly.) Guess what I use. In conjunction with Emacs, of course :-/ -- Rhodri James *-* Kynesim Ltd __

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Mike Miller
On 2020-05-21 05:48, Joao S. O. Bueno wrote: Input _is_ hard or rare. Deal with it. Even the font is not uniformily configured across systems, and a glyph one does see here may not show properly on the terminal, or other Maybe long ago. My terminals support even color emoji, have for year

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread David Mertz
You are SERIOUSLY suggesting that typing 'Ctrl-Shift-U 2 1 9 2 ' is easier for me than typing '->' as I do now!? And it remains easier if I use a different computer where I have to figure out or remember some different way of getting the Unicode code point into the editor? The goal of this being

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Mike Miller
On 2020-05-20 14:56, Steven D'Aprano wrote: Not everyone is programming in a GUI environment all the time Well, I gave a number of examples to show there are many ways to do it. Not every example will work well for everyone. The best that works for your platform and tools should be chosen

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Rob Cliffe via Python-ideas
On 21/05/2020 14:50, Steve Barnes wrote: The issue is simple and simple enough for a beginner to fall foul of - test procedure: Change directory to any directory with files in totally a few 10s of megs (ideally but it doesn't matter much). python -m zipfile -c my_zipfile.zip . Wait a few mi

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
On Thursday, May 21, 2020 1:14 PM MRAB [mailto:pyt...@mrabarnett.plus.com] wrote > On 2020-05-21 16:48, Serhiy Storchaka wrote: > > 21.05.20 16:45, Alex Hall пише: > >> ≥ instead of >= might be an improvement because that's a > >> symbol learned in school, but ultimately the student still needs to

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread MRAB
On 2020-05-21 16:48, Serhiy Storchaka wrote: 21.05.20 16:45, Alex Hall пише: ≥ instead of >= might be an improvement because that's a symbol learned in school, but ultimately the student still needs to learn what `>=` means as it will be used most of the time. But in my school I learned ⩾, no

[Python-ideas] Re: [Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-21 Thread Christopher Barker
On Thu, May 21, 2020 at 4:02 AM Steven D'Aprano wrote: > On Wed, May 20, 2020 at 06:31:51PM -0700, Christopher Barker wrote: > > > I'm still confused why the ternary flag (mode) idea never comes up in > these > > arguments -- I know I like that the best. But yeah, I can except that > it's > > dea

[Python-ideas] Re: Optional keyword arguments

2020-05-21 Thread MRAB
On 2020-05-21 12:56, Rhodri James wrote: On 20/05/2020 23:20, James Lu wrote: There's a thirty year tradition of doing that because there's no terser way to do it. Terser does not mean better. In my experience, terser code is often harder to comprehend, particularly when you are talking about

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Guido van Rossum
Hi Steve, Have you considered and rejected filing a bug on bugs.python.org? Or are you specifically concerned about how to write a test for this behavior that doesn't fill up the disk when the bug is present? On Unixoid systems there's a resource limit you can set to limit disk space IIRC (e.g. o

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Serhiy Storchaka
21.05.20 16:45, Alex Hall пише: ≥ instead of >= might be an improvement because that's a symbol learned in school, but ultimately the student still needs to learn what `>=` means as it will be used most of the time. But in my school I learned ⩾, not ≥. It was used in USSR and I believe in oth

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Alex Hall
On Thu, May 21, 2020 at 4:36 PM Thierry Parmentelat < thierry.parmente...@inria.fr> wrote: > > Again, if I saw a unicode arrow used as syntax on GitHub or something in > the wild right now, I would think it's an error, which incidentally would > be correct. Wouldn't you? > > yes, like I would have

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Edwin Zimmerman
On Thursday, May 21, 2020 9:20 AM Joao S. O. Bueno [mailto:jsbu...@python.org.br] wrote > On Thu, 21 May 2020 at 10:06, Thierry Parmentelat > wrote: > > > > > > > > > On 21 May 2020, at 14:48, Joao S. O. Bueno wrote: > > > > > > (I had a coleague once which did > > > set a special VIM config to

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21 May 2020, at 16:18, Alex Hall wrote: > > What I mean is that they would only have seen ASCII symbols used for Python > syntax i.e. not counting the contents of strings. and identifiers > Currently that's the experience of 100% of all Python coders. That percentage > will drop a lit

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Paul Sokolovsky
Hello, On Thu, 21 May 2020 13:26:32 +0200 Thierry Parmentelat wrote: [] > Do we want to get stuck in the 20th century just because everything > is not yet perfect in a non-purely ASCII world ? Short answer: yes. Long answer: ASCII was defined in 1963 and hasn't won over yet, e.g. EBCDIC is ali

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Rhodri James
On 21/05/2020 15:29, Thierry Parmentelat wrote: On 21/05/2020 15:09, Thierry Parmentelat wrote: clearly the experienced Python programmers are not the main target here our 7-year old schoolboys are used to typing é's and ç and ü’s and À’s, and this is Europe, not China, so... You say that,

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21/05/2020 15:09, Thierry Parmentelat wrote: >> clearly the experienced Python programmers are not the main target here >> our 7-year old schoolboys are used to typing é's and ç and ü’s and À’s, and >> this is Europe, not China, so... > > You say that, but it is a source of endless annoyanc

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Alex Hall
On Thu, May 21, 2020 at 4:09 PM Thierry Parmentelat < thierry.parmente...@inria.fr> wrote: > > > > On 21 May 2020, at 15:45, Alex Hall wrote: > > > > Many (probably most) people are going to come across a unicode symbol > having previously only encountered ASCII symbols and probably thinking that

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Rhodri James
On 21/05/2020 15:09, Thierry Parmentelat wrote: clearly the experienced Python programmers are not the main target here our 7-year old schoolboys are used to typing é's and ç and ü’s and À’s, and this is Europe, not China, so... You say that, but it is a source of endless annoyance to me that

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21 May 2020, at 15:45, Alex Hall wrote: > > Many (probably most) people are going to come across a unicode symbol having > previously only encountered ASCII symbols and probably thinking that was the > only option. That includes all currently experienced Python programmers who > aren't

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21 May 2020, at 15:19, Joao S. O. Bueno wrote: > > That is, if you answered the question about > which right arrow to use, asked above) that’s an easy one, see the OP In [1]: print("\u2192”) → for all the rest, I am sorry, all the arguments about people having trouble inputing those ch

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Steve Barnes
The issue is simple and simple enough for a beginner to fall foul of - test procedure: Change directory to any directory with files in totally a few 10s of megs (ideally but it doesn't matter much). python -m zipfile -c my_zipfile.zip . Wait a few minutes and press control-C then do a directory

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Alex Hall
On Wed, May 20, 2020 at 8:36 AM Thierry Parmentelat < thierry.parmente...@inria.fr> wrote: > Plus, it’s not only IDE’s, I’m prominently concerned by beginners and > students, who start reading code on sources like github, or teaching > websites, or notebooks; one cannot expect all these stacks to

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Dan Sommers
On Thursday, May 21, 2020, at 8:48, Joao S. O. Bueno wrote: > On Wed, 20 May 2020 at 17:17, Mike Miller wrote: >> >> >> On 2020-05-20 00:44, Chris Angelico wrote: >> > If you think that a keyboard with fancy arrows on it will take off any >> > quicker, you're extremely hopeful. >> >> While I'm

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Joao S. O. Bueno
On Thu, 21 May 2020 at 10:06, Thierry Parmentelat wrote: > > > > > On 21 May 2020, at 14:48, Joao S. O. Bueno wrote: > > > > (I had a coleague once which did > > set a special VIM config to display "!=" as > > "[can't type, math 'different' sign from here]" > > and even that was mostly a toy tha

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 21 May 2020, at 14:48, Joao S. O. Bueno wrote: > > (I had a coleague once which did > set a special VIM config to display "!=" as > "[can't type, math 'different' sign from here]" > and even that was mostly a toy than anything > really useful. I guess that is my point exactly: the main r

[Python-ideas] Re: How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread remi . lapeyre
If the file is supposed to be small, would patching write() in the test to accumulate the number of bytes written and fail the test when it goes over what it's supposed to be possible? What is the issue? ___ Python-ideas mailing list -- python-ideas@py

[Python-ideas] Re: Optional keyword arguments

2020-05-21 Thread Alex Hall
On Thu, May 21, 2020 at 12:27 AM James Lu wrote: > > This is already valid in 3.8, so we should forget about overloading := > > with a second meaning. > > def func(x=(a:=expression), y=a+1): > def func(x:=options): > > These two syntaxes do not conflict with each other. > Technically no, but the

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Joao S. O. Bueno
On Wed, 20 May 2020 at 17:17, Mike Miller wrote: > > > On 2020-05-20 00:44, Chris Angelico wrote: > > If you think that a keyboard with fancy arrows on it will take off any > > quicker, you're extremely hopeful. > > While I'm not sure how useful this is in the long run, the oft mentioned > drawbac

[Python-ideas] Re: Optional keyword arguments

2020-05-21 Thread Rhodri James
On 21/05/2020 13:24, Chris Angelico wrote: On Thu, May 21, 2020 at 9:58 PM Rhodri James wrote: On 20/05/2020 23:20, James Lu wrote: There's a thirty year tradition of doing that because there's no terser way to do it. Terser does not mean better. In my experience, terser code is often hard

[Python-ideas] Re: Optional keyword arguments

2020-05-21 Thread Chris Angelico
On Thu, May 21, 2020 at 9:58 PM Rhodri James wrote: > > On 20/05/2020 23:20, James Lu wrote: > > There's a thirty year tradition of doing that because there's no > > terser way to do it. > > Terser does not mean better. In my experience, terser code is often > harder to comprehend, particularly w

[Python-ideas] Re: Optional keyword arguments

2020-05-21 Thread Rhodri James
On 20/05/2020 23:20, James Lu wrote: There's a thirty year tradition of doing that because there's no terser way to do it. Terser does not mean better. In my experience, terser code is often harder to comprehend, particularly when you are talking about squashing a couple of lines together li

[Python-ideas] Re: [Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-21 Thread Rob Cliffe via Python-ideas
On 16/05/2020 17:14, Guido van Rossum wrote: On Sat, May 16, 2020 at 1:26 AM Steven D'Aprano > wrote: > * zip(strict=True)       +1 > * zip(mode='strict')     -0 > * itertools.zip_strict() -0.5 > * zip.strict()           -1  (but really, I'd like to

[Python-ideas] Re: type hints : I'd like to suggest allowing unicode → as an alternative to ->

2020-05-21 Thread Thierry Parmentelat
> On 20 May 2020, at 23:56, Steven D'Aprano wrote: > >> I've been using Unicode everywhere for about a decade—it's time to retire >> the argument that input is still hard or rare. > > I can sincerely say that I am very happy that your experience is so > good, but I'm also exceedingly jealous

[Python-ideas] Re: [Python-Dev] Re: PEP 618: Add Optional Length-Checking To zip

2020-05-21 Thread Steven D'Aprano
On Wed, May 20, 2020 at 06:31:51PM -0700, Christopher Barker wrote: > I'm still confused why the ternary flag (mode) idea never comes up in these > arguments -- I know I like that the best. But yeah, I can except that it's > dead. Because the standard spelling of flags in ternary logic are True,

[Python-ideas] How to propose a change with tests where the failing test case (current behaviour) is bad or dangerous

2020-05-21 Thread Steve Barnes
There is a long standing issue, (or at least I consider it a poor feature some others consider it compliance with other existing tools), with a couple of python standard libraries that I would like to raise an issue for & PR(s) to address but when it comes to putting tests in place the failing t