Re: [Python-Dev] PEP 484 -- proposal to allow @overload in non-stub files

2015-10-22 Thread Guido van Rossum
On Thu, Oct 22, 2015 at 2:21 AM, Gregory P. Smith wrote: > > > On Wed, Oct 21, 2015 at 6:51 PM Guido van Rossum wrote: > >> Well the whole point is not to have to figure out how to implement that >> right now. >> >> On Wed, Oct 21, 2015 at 6:45 PM, Random832

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

2015-10-22 Thread Sven R. Kunze
Yeah, that would be weird. Really? That's ridiculous. We don't allow DEF or DeF for function definitions either. So, I don't see any value in it. IMHO, It's time for a clean up again. On 22.10.2015 19:09, Ryan Gonzalez wrote: But it'd be weird now if fR worked but fbR didn't. On Thu, Oct

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

2015-10-22 Thread R. David Murray
On Thu, 22 Oct 2015 17:02:48 -, Brett Cannon wrote: > On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote: > > > Hi all, > > > > When we compile a python script > > > > # test.py > > if 0: > > x = 1 > > > > python -mdis test.py > > > > There is

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

2015-10-22 Thread Brett Cannon
On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote: > Hi all, > > When we compile a python script > > # test.py > if 0: > x = 1 > > python -mdis test.py > > There is no byte code for the condition. > > So my question is, the byte code generator removes the unused

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

2015-10-22 Thread Eric V. Smith
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. Eric. > > On Thu, Oct 22, 2015 at 12:02 PM, Sven R. Kunze > wrote: > > On 22.10.2015

Re: [Python-Dev] PEP 484 -- proposal to allow @overload in non-stub files

2015-10-22 Thread Paul Moore
On 22 October 2015 at 10:21, Gregory P. Smith wrote: > On Wed, Oct 21, 2015 at 6:51 PM Guido van Rossum wrote: >> >> Well the whole point is not to have to figure out how to implement that >> right now. >> >> On Wed, Oct 21, 2015 at 6:45 PM, Random832

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

2015-10-22 Thread Eric V. Smith
On 10/21/2015 10:57 PM, Ryan Gonzalez wrote: > It mentions fr'...' as a formatted raw string but doesn't say anything > about rf'...'. Right now, in implementing PEP 498 support in Howl > (https://github.com/howl-editor/howl/pull/118 and >

Re: [Python-Dev] PEP 484 -- proposal to allow @overload in non-stub files

2015-10-22 Thread Gregory P. Smith
On Wed, Oct 21, 2015 at 6:51 PM Guido van Rossum wrote: > Well the whole point is not to have to figure out how to implement that > right now. > > On Wed, Oct 21, 2015 at 6:45 PM, Random832 wrote: > >> Guido van Rossum writes: >> >

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

2015-10-22 Thread Ryan Gonzalez
Ah, I missed that part. Sorry! :/ On October 22, 2015 7:27:41 AM CDT, "Eric V. Smith" wrote: >On 10/22/2015 7:32 AM, Eric V. Smith wrote: >> On 10/21/2015 10:57 PM, Ryan Gonzalez wrote: >>> It mentions fr'...' as a formatted raw string but doesn't say >anything >>> about

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

2015-10-22 Thread Chris Angelico
On Fri, Oct 23, 2015 at 3:05 PM, Terry Reedy wrote: > Indeed, whether 'pass' should be compiled to 'NOP' or nothing depends on > one's view of the meaning of pass and whether it must be executed (by going > though the ceval loop once and doing nothing) or not. Hmm. I thought

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

2015-10-22 Thread Terry Reedy
On 10/22/2015 1:56 PM, R. David Murray wrote: On Thu, 22 Oct 2015 17:02:48 -, Brett Cannon wrote: On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote: Hi all, When we compile a python script # test.py if 0: x = 1 python -mdis test.py

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

2015-10-22 Thread Eric V. Smith
On 10/22/2015 7:32 AM, Eric V. Smith wrote: > On 10/21/2015 10:57 PM, Ryan Gonzalez wrote: >> It mentions fr'...' as a formatted raw string but doesn't say anything >> about rf'...'. Right now, in implementing PEP 498 support in Howl >> (https://github.com/howl-editor/howl/pull/118 and >>

[Python-Dev] Generated Bytecode ...

2015-10-22 Thread Stéphane Wirtel
Hi all, When we compile a python script # test.py if 0: x = 1 python -mdis test.py There is no byte code for the condition. So my question is, the byte code generator removes the unused functions, variables etc…, is it right? What are the cases where the generator does not generate

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

2015-10-22 Thread Sven R. Kunze
On 22.10.2015 13:32, Eric V. Smith wrote: ['B', 'BF', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'Bf', 'BfR', 'Bfr', 'Br', 'BrF', 'Brf', 'F', 'FB', 'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'Fb', 'FbR', 'Fbr', 'Fr', 'FrB', 'Frb', 'R', 'RB', 'RBF', 'RBf', 'RF', 'RFB', 'RFb', 'Rb', 'RbF', 'Rbf', 'Rf', 'RfB',

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

2015-10-22 Thread Ryan Gonzalez
On October 22, 2015 11:10:48 AM CDT, "Sven R. Kunze" wrote: >On 22.10.2015 13:32, Eric V. Smith wrote: >> ['B', 'BF', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'Bf', 'BfR', 'Bfr', >'Br', >> 'BrF', 'Brf', 'F', 'FB', 'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'Fb', >'FbR', >> 'Fbr', 'Fr', 'FrB',

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

2015-10-22 Thread Sven R. Kunze
On 22.10.2015 18:17, Ryan Gonzalez wrote: anything about it. 'FbR', really? Why not disallowing them? I for one could live with all-lower-case AND a predefined order. Well, now it's backwards-compatibility. Huh? There are no fb strings yet. Best, Sven

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

2015-10-22 Thread Stéphane Wirtel
Thank you Brett, I am going to read the source code, I am going to give a presentation at PyCon.IE about this part and I wanted to be sure about the dead branches. Thanks On 22 Oct 2015, at 19:02, Brett Cannon wrote: > On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote: >

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

2015-10-22 Thread Ryan Gonzalez
But it'd be weird now if fR worked but fbR didn't. On Thu, Oct 22, 2015 at 12:02 PM, Sven R. Kunze wrote: > On 22.10.2015 18:17, Ryan Gonzalez wrote: > >> >>> anything about it. 'FbR', really? >>> Why not disallowing them? >>> >>> I for one could live with all-lower-case