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

2015-10-25 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 talk in the past f

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

2015-10-25 Thread Ben Finney
"Stéphane Wirtel" writes: > I would like to understand this part of Python, could you help me? You should also know the Python Language Reference documentation https://docs.python.org/3/reference/>, especially the Full Grammar specification https://docs.python.org/3/reference/grammar.html>. --

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

2015-10-25 Thread Laura Creighton
All these overloads makes the code hard to read. The whole idea of 'i have to know which decorator got called before the other one' is a smell that you have too many decorators. This whole idea reeks 'i can be very, very clever here'. Laura ___ Python-

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

2015-10-25 Thread Guido van Rossum
I've thought this over and I don't think it's worth it. We need to wait for a working proposal for multi-dispatch first. Otherwise we'll just end up having to support this interim syntax *and* whatever the new multi-dispatch is. Keeping @overload restricted to stub files makes it much more tractabl

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

2015-10-25 Thread Guido van Rossum
On Fri, Oct 23, 2015 at 8:38 AM, Nick Coghlan wrote: > On 22 October 2015 at 19:51, Guido van Rossum wrote: > > On Thu, Oct 22, 2015 at 2:21 AM, Gregory P. Smith > wrote: > >> What would it Foo.__getitem__.__annotations__ contain in this situation? > >> It'd unfortunately be an empty dict if im

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

2015-10-25 Thread Raymond Hettinger
> On Oct 22, 2015, at 10:02 AM, Brett Cannon wrote: > > So my question is, the byte code generator removes the unused functions, > variables etc…, is it right? > > Technically the peepholer removes the dead branch, but since the peepholer is > run on all bytecode you can't avoid it. IIRC, th

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

2015-10-25 Thread Raymond Hettinger
> On Oct 25, 2015, at 12:33 PM, Raymond Hettinger > wrote: > >> On Oct 22, 2015, at 10:02 AM, Brett Cannon wrote: >> >> So my question is, the byte code generator removes the unused functions, >> variables etc…, is it right? >> >> Technically the peepholer removes the dead branch, but since

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

2015-10-25 Thread Nick Coghlan
On 22 October 2015 at 19:51, Guido van Rossum wrote: > On Thu, Oct 22, 2015 at 2:21 AM, Gregory P. Smith wrote: >> What would it Foo.__getitem__.__annotations__ contain in this situation? >> It'd unfortunately be an empty dict if implemented in the most trivial >> fashion rather than a dict conta

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

2015-10-25 Thread Stéphane Wirtel
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? Thank you Stéphane -- Stéphane Wirtel - http://wirtel.be - @matrixise signature.asc Description: OpenPGP di

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

2015-10-25 Thread Stephane Wirtel
Thank you for your confirmation, I am going to read the devguide. > On 25 oct. 2015, at 7:50 PM, Raymond Hettinger > wrote: > > >>> On Oct 25, 2015, at 12:33 PM, Raymond Hettinger >>> wrote: >>> >>> On Oct 22, 2015, at 10:02 AM, Brett Cannon wrote: >>> >>> So my question is, the byte cod

[Python-Dev] Summary of Python tracker Issues

2015-10-25 Thread Python tracker
ACTIVITY SUMMARY (2015-10-16 - 2015-10-23) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open5181 (+29) closed 32043 (+17) total 37224 (+46) Open issues wit