Re: [Python-Dev] Thanks for your hard work and my New Years resolutions

2015-12-26 Thread Guido van Rossum
+1 Thanks to everyone who has contributed to Python! And thanks everyone for being such an awesome community. Oh, and thanks to Brett for taking on those unpopular jobs. --Guido On Fri, Dec 25, 2015 at 10:46 AM, Brett Cannon wrote: > I just wanted to quickly thank everyone

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Erik
Hi Joe, On 26/12/15 22:36, Joe Jevnik wrote: The number and meaning of the arguments are documented in the dis module: https://docs.python.org/3.6/library/dis.html OK - I *did* find that, but perhaps didn't immediately understand what it was telling me. So, something documented as

[Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Erik
Hi. Looking at ceval.c and peephole.c, there is - of course - lots of specific hard-coded knowledge of the bytecode (e.g., number of operands and other attributes). I'd like to experiment at this level, but I can't seem to find a reference for the bytecode. Is there the equivalent of

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Guido van Rossum
On Sat, Dec 26, 2015 at 6:06 PM, Brett Cannon wrote: > Ned also neglected to mention his byterun project which is a pure Python > implementation of the CPython eval loop: https://github.com/nedbat/byterun > >From the commit log it looks like it's a co-production between Ned and

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Joe Jevnik
The number and meaning of the arguments are documented in the dis module: https://docs.python.org/3.6/library/dis.html On Sat, Dec 26, 2015 at 5:20 PM, Erik wrote: > Hi. > > Looking at ceval.c and peephole.c, there is - of course - lots of specific > hard-coded

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Guido van Rossum
Also there's a great talk by Allison Kaptur on YouTube about this topic: https://www.youtube.com/watch?v=HVUTjQzESeo -- --Guido van Rossum (python.org/~guido) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Ned Batchelder
On 12/26/15 6:13 PM, Erik wrote: On 26/12/15 23:10, Joe Jevnik wrote: All arguments are 2 bytes, if there needs to be more, EXTENDED_ARG is used OK, got it - many thanks. One thing to understand that may not be immediately apparent: the byte code can (and does) change between versions, so

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Erik
On 26/12/15 23:10, Joe Jevnik wrote: All arguments are 2 bytes, if there needs to be more, EXTENDED_ARG is used OK, got it - many thanks. E. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Brett Cannon
Ned also neglected to mention his byterun project which is a pure Python implementation of the CPython eval loop: https://github.com/nedbat/byterun On Sat, 26 Dec 2015, 16:38 Ned Batchelder wrote: > On 12/26/15 6:13 PM, Erik wrote: > > On 26/12/15 23:10, Joe Jevnik

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Joe Jevnik
All arguments are 2 bytes, if there needs to be more, EXTENDED_ARG is used On Sat, Dec 26, 2015 at 5:51 PM, Erik wrote: > Hi Joe, > > On 26/12/15 22:36, Joe Jevnik wrote: > >> The number and meaning of the arguments are documented in the dis >> module:

Re: [Python-Dev] Is there a reference manual for Python bytecode?

2015-12-26 Thread Nick Coghlan
On 27 December 2015 at 12:23, Guido van Rossum wrote: > On Sat, Dec 26, 2015 at 6:06 PM, Brett Cannon wrote: >> >> Ned also neglected to mention his byterun project which is a pure Python >> implementation of the CPython eval loop: