Re: [Python-Dev] Generated Bytecode ...

2015-10-26 Thread Terry Reedy
On 10/23/2015 4:23 AM, Victor Stinner wrote: Hi, 2015-10-22 19:02 GMT+02:00 Brett Cannon : It's not specified anywhere; it's just what the peepholer decides to remove. The exact code can be found at https://hg.python.org/cpython/file/default/Python/peephole.c . There has been

Re: [Python-Dev] Where is defined the grammar of Python?

2015-10-26 Thread Nick Coghlan
On 24 October 2015 at 15:53, Stéphane Wirtel wrote: > Hi all, > > Just to understand, we have the Parser/Python.asdl and Grammar/Grammar files. > > Which one is used for the AST ? > > I would like to understand this part of Python, could you help me? An overview of all the

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Nick Coghlan
On 22 October 2015 at 19:12, Eric V. Smith wrote: > On 10/22/2015 1:09 PM, Ryan Gonzalez wrote: >> But it'd be weird now if fR worked but fbR didn't. > > Or bR (which is currently allowed) but not fbR in the future. My own objection isn't to allowing "fR" or "fbR", it's to

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Ethan Furman
On 10/26/2015 11:45 AM, Sven R. Kunze wrote: On 26.10.2015 16:22, Ethan Furman wrote: On 10/23/2015 08:20 AM, Nick Coghlan wrote: My own objection isn't to allowing "fR" or "fbR", it's to allowing the uppercase "F". I also don't understand why we can't say "if 'f' is part of a string prefix,

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread MRAB
On 2015-10-26 18:45, Sven R. Kunze wrote: On 26.10.2015 16:22, Ethan Furman wrote: On 10/23/2015 08:20 AM, Nick Coghlan wrote: My own objection isn't to allowing "fR" or "fbR", it's to allowing the uppercase "F". I also don't understand why we can't say "if 'f' is part of a string prefix, it

[Python-Dev] (no subject)

2015-10-26 Thread Maciej Szulik
Thanks to Nick Coghlan and Barry Warsaw we've setup a new SIG dedicated to discussing python features from different distributions point of view. Here is Nick's reasoning: > With the Python 3 migration, and the growth in interest in user level > package management for development purposes, what

Re: [Python-Dev] Generated Bytecode ...

2015-10-26 Thread Victor Stinner
2015-10-24 4:34 GMT+09:00 Terry Reedy : > How about -x nopeep to specifically skip the peephole optimizer? Raymond wrote "IIRC, the code was never generated in the first place (before the peephole pass)." So "nopeep" would have a different purpose. Victor

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread francismb
>> Sometimes order matters, and sometimes it does not. If the order does >> not have an impact on the final code, it does not matter, and making >> us have to remember an order that does not matter is a waste. > > Order that matters? You must be kidding. That would turn different types > of

Re: [Python-Dev] Generated Bytecode ...

2015-10-26 Thread Terry Reedy
On 10/26/2015 10:36 PM, Victor Stinner wrote: 2015-10-24 4:34 GMT+09:00 Terry Reedy : How about -x nopeep to specifically skip the peephole optimizer? Raymond wrote "IIRC, the code was never generated in the first place (before the peephole pass)." I based that suggestion

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Martin Panter
On 26 October 2015 at 19:43, MRAB wrote: > On 2015-10-26 18:45, Sven R. Kunze wrote: >> >> On 26.10.2015 16:22, Ethan Furman wrote: >>> >>> On 10/23/2015 08:20 AM, Nick Coghlan wrote: My own objection isn't to allowing "fR" or "fbR", it's to allowing the

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Sven R. Kunze
On 26.10.2015 16:22, Ethan Furman wrote: On 10/23/2015 08:20 AM, Nick Coghlan wrote: My own objection isn't to allowing "fR" or "fbR", it's to allowing the uppercase "F". I also don't understand why we can't say "if 'f' is part of a string prefix, it must be first". Sometimes order matters,

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Ethan Furman
On 10/23/2015 08:20 AM, Nick Coghlan wrote: On 22 October 2015 at 19:12, Eric V. Smith wrote: On 10/22/2015 1:09 PM, Ryan Gonzalez wrote: But it'd be weird now if fR worked but fbR didn't. Or bR (which is currently allowed) but not fbR in the future. My own objection isn't to allowing

Re: [Python-Dev] Where is defined the grammar of Python?

2015-10-26 Thread Brett Cannon
On Sun, 25 Oct 2015 at 19:51 Stéphane Wirtel wrote: > Hi all, > > Just to understand, we have the Parser/Python.asdl and Grammar/Grammar > files. > > Which one is used for the AST ? > > I would like to understand this part of Python, could you help me? > > See