Re: [Python-Dev] Micro-benchmarks for function calls (PEP 576/579/580)

2018-07-09 Thread INADA Naoki
On Tue, Jul 10, 2018 at 7:23 AM Jeroen Demeyer wrote: > > Here is an initial version of a micro-benchmark for C function calling: > > https://github.com/jdemeyer/callbench > > I don't have results yet, since I'm struggling to find the right options > to "perf timeit" to get a stable result. If

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Guido van Rossum
On Mon, Jul 9, 2018 at 8:24 PM, Rob Cliffe via Python-Dev < python-dev@python.org> wrote: > I apologise for not replying in the form of a Pull Request - I don't know > how to make one. > > > On 10/07/2018 02:00, Guido van Rossum wrote: > >> Rationale >> = >> >> Naming the result of an

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Glenn Linderman
On 7/9/2018 8:43 PM, Guido van Rossum wrote: An exception to this special case applies when the target name is the same as a loop control variable for a comprehension containing it. This is invalid.  This exception exists to rule out edge cases of the above scope rules as

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Guido van Rossum
On Mon, Jul 9, 2018 at 7:40 PM, Glenn Linderman wrote: > On 7/9/2018 6:00 PM, Guido van Rossum wrote: > > This rule is included to simplify the choice for the user between an > assignment statements and an assignment expression -- there is no > > > "statements" should not be plural in the

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Rob Cliffe via Python-Dev
I apologise for not replying in the form of a Pull Request - I don't know how to make one. On 10/07/2018 02:00, Guido van Rossum wrote: Rationale = Naming the result of an expression is an important part of programming, allowing a descriptive name to be used in place of a longer

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Alex Walters
> -Original Message- > From: Python-Dev list=sdamon@python.org> On Behalf Of Paul Moore > Why not just have a second button, "Download Python 3.7.0 (64-bit)" > alongside or below the "Download Python 3.7.0" button? People who > don't know the difference will just ignore it,

Re: [Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Glenn Linderman
On 7/9/2018 6:00 PM, Guido van Rossum wrote: This rule is included to simplify the choice for the user between an   assignment statements and an assignment expression -- there is no "statements" should not be plural in the above line. syntactic position where both are valid. An exception

[Python-Dev] Encoding variable-length integers/counts in pickle

2018-07-09 Thread MRAB
In the regex module I use an encoding scheme when pickling pattern objects which is based on the way MIDI encodes variable-length integers, and I think it might have a use in a pickle protocol. In the basic format, an integer is split up into 7-bit chunks, each chunk put into a byte, and the

[Python-Dev] PEP 572: Assignment Expressions -- intention to accept, near-final draft

2018-07-09 Thread Guido van Rossum
A lot has been said about PEP 572. I am planning to accept it soon, hopefully within a week. I realize I should have posted the draft from May 22 (when Tim and I were added as authors and it was significantly updated -- see https://github.com/python/peps/pull/654). For this I apologize. Since then

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Anthony Flury via Python-Dev
On 09/07/18 08:26, Matěj Cepl wrote: On 2018-07-07, 15:48 GMT, Guido van Rossum wrote: if validate(name := re.search(pattern, line).group(1)): return name Except there is no error handling for situations when re.search() returns None, so one shouldn't use it anyway (most of the

[Python-Dev] Micro-benchmarks for function calls (PEP 576/579/580)

2018-07-09 Thread Jeroen Demeyer
Here is an initial version of a micro-benchmark for C function calling: https://github.com/jdemeyer/callbench I don't have results yet, since I'm struggling to find the right options to "perf timeit" to get a stable result. If somebody knows how to do this, help is welcome. Jeroen.

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-09 Thread Guido van Rossum
Definitely docs first. And we should keep references to generator expressions too, if only to explain that they've been renamed. Perhaps someone should try it out in a 3rd party tutorial to see how it goes? I'm CC'ing Raymond Hettinger. On Mon, Jul 9, 2018 at 12:57 PM Brett Cannon wrote: > > >

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-09 Thread Brett Cannon
On Mon, 9 Jul 2018 at 12:05 Guido van Rossum wrote: > I think this is worth a try. > How far do we want to go with this? Update the docs? Update the grammar and/or code? I think the former is probably good enough for now to see if it takes, and if it does then we can talk about updating code to

Re: [Python-Dev] PEP 574 -- Pickle protocol 5 with out-of-band data

2018-07-09 Thread Olivier Grisel
Hi Serhiy, Do you have any bug / issue to track the work you want to do to add native pickling support for locally defined function and classes by serializing the code objects like cloudpickle does? Is this work public on some git branch on GitHub or somewhere else? Cheers, -- Olivier ​

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-09 Thread Guido van Rossum
I think this is worth a try. On Mon, Jul 9, 2018 at 12:04 PM Chris Barker - NOAA Federal < chris.bar...@noaa.gov> wrote: > TL;DR- > > +1 on advocating the term “generator comprehension” as a synonym for > “generator expression” in future documentation and instructional > materials. > > The long

Re: [Python-Dev] Naming comprehension syntax [was Re: Informal educator feedback on PEP 572 ...]

2018-07-09 Thread Chris Barker - NOAA Federal via Python-Dev
TL;DR- +1 on advocating the term “generator comprehension” as a synonym for “generator expression” in future documentation and instructional materials. The long version: If we were starting from scratch, maybe it would makes sense to use “ builder” or something else, rather than comprehension.

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Steve Dower
On 09Jul2018 0922, Antoine Pitrou wrote: On Mon, 9 Jul 2018 09:01:00 -0700 Steve Dower wrote: I've thought a bit about making a single installer that can offer the option of 32-bit/64-bit at install time, but I don't actually think it's that big a problem to deserve that much effort as a

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Steve Dower
On 09Jul2018 0927, Ivan Pozdeev via Python-Dev wrote: On 09.07.2018 19:01, Steve Dower wrote: Perhaps we should add non-button text below the button saying "Get the 64-bit version"? Maybe infer the bitness from User-Agent instead. This seems to be the trend among official sites in general.

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Ivan Pozdeev via Python-Dev
On 09.07.2018 19:01, Steve Dower wrote: On 09Jul2018 0803, Cosimo Lupo wrote: If one goes to httWhps://www.python.org/downloads  from a Windows browser, the default download URL is for the 32-bit installer instead of the 64-bit one. I wonder why is this

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Paul Moore
On 9 July 2018 at 17:01, Steve Dower wrote: > On 09Jul2018 0803, Cosimo Lupo wrote: >> >> If one goes to httWhps://www.python.org/downloads >> from a Windows browser, the default >> download URL is for the 32-bit installer instead of the 64-bit one. >> I wonder

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Chris Angelico
On Tue, Jul 10, 2018 at 2:20 AM, Paddy McCarthy wrote: > > > On Sat, 7 Jul 2018 at 16:50, Guido van Rossum wrote: >> >> This seems more suitable for a style guide. > > > Which would be good enough, if the automatic checkers were improved to flag > such poor use of ':='.. > > Would that be

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Antoine Pitrou
On Mon, 9 Jul 2018 09:01:00 -0700 Steve Dower wrote: > On 09Jul2018 0803, Cosimo Lupo wrote: > > If one goes to httWhps://www.python.org/downloads > >  from a Windows browser, the default > > download URL is for the 32-bit installer instead of the 64-bit one.

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Paddy McCarthy
On Sat, 7 Jul 2018 at 16:50, Guido van Rossum wrote: > This seems more suitable for a style guide. > Which would be good enough, if the automatic checkers were improved to flag such poor use of ':='.. Would that be possible? ___ Python-Dev mailing

Re: [Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Steve Dower
On 09Jul2018 0803, Cosimo Lupo wrote: If one goes to httWhps://www.python.org/downloads  from a Windows browser, the default download URL is for the 32-bit installer instead of the 64-bit one. I wonder why is this still the case? Shouldn't we encourage new

[Python-Dev] why is not 64-bit installer the default download link for Windows?

2018-07-09 Thread Cosimo Lupo
If one goes to httWhps://www.python.org/downloads from a Windows browser, the default download URL is for the 32-bit installer instead of the 64-bit one. I wonder why is this still the case? Shouldn't we encourage new Windows users (who may not even know the

Re: [Python-Dev] Time for 3.4.9 and 3.5.6

2018-07-09 Thread Matěj Cepl
On 2018-07-08, 22:32 GMT, Larry Hastings wrote: > More importantly, 3.4 is in security-fixes-only mode, which > means that changes that aren't security fixes won't be > accepted. So, why isn’t https://bugs.python.org/issue31623 closed as WONTFIX (or whatever is the equivalent in b.p.o)? If we

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Berker Peksağ
On Mon, Jul 9, 2018 at 8:54 AM, Tim Peters wrote: > [Eric V. Smith] >> >> > there is at least one place >> >> > where the grammar does forbid you from doing something that would >> > otherwise make be allowable: decorators. > > > [Greg Ewing] >> >> And that was a controversial issue at the time.

Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Matěj Cepl
On 2018-07-07, 15:48 GMT, Guido van Rossum wrote: > if validate(name := re.search(pattern, line).group(1)): > return name Except there is no error handling for situations when re.search() returns None, so one shouldn't use it anyway (most of the time). Which seems to me like another

Re: [Python-Dev] PEP 575, 576, 579 and 580

2018-07-09 Thread Jeroen Demeyer
On 2018-07-08 23:13, Mark Shannon wrote: I've added you suggestion, and everyone else's, to this github repo: https://github.com/markshannon/extended-calling-convention Feel free to comment on github, submit PRs or just email me directly if you have anything else you want to add. Do you agree