News for hackers. Stuff that matters.
Re:Understanding Python Bytecode by marktangotango on Tuesday November 04, 2014 @09:38AM (#8556640)
Nice overview of Python bytecode. Reminded me of the 'No Frills Introduction to Lua 5.1 VM Instructions'[1]. I have not seen a similar document for Python yet, is there one?

[1] http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInst...

Re:Understanding Python Bytecode by abecedarius on Tuesday November 04, 2014 @04:05PM (#8559037)
I don't think so; https://docs.python.org/3/library/dis.html#python-bytecode-i... was the closest I found when I was writing a compiler for a subset of Python, and that doc was a little sketchy and out of date. I ended up consulting the CPython source a lot and reading some helpful blog series:

http://docs.python.org/devguide/compiler.html http://akaptur.github.io/blog/categories/python-internals/ http://eli.thegreenplace.net/category/programming/python/pyt... http://tech.blog.aknin.name/category/my-projects/pythons-inn... http://www.matusiak.eu/numerodix/blog/category/python-intern...

Also Python 2 comes with a 'compiler' module which reimplements the built-in compiler in Python. (The real one is in C. The Python one was dropped from Python 3.)

Re:Understanding Python Bytecode by bnasty576 on Tuesday November 04, 2014 @09:50AM (#8556708)
What is this used for? This went right over my head.
Re:Understanding Python Bytecode by maxerickson on Tuesday November 04, 2014 @10:01AM (#8556776)
The byte code here is an implementation detail of an interpreter for the Python programming language. Wikipedia seems to have decent coverage:

http://en.wikipedia.org/wiki/Bytecode

Someone at Coverity would likely be interested in understanding it to use in analyzing source code. They use automatic analysis to find defects.

Re:Understanding Python Bytecode by RubyPinch on Tuesday November 04, 2014 @12:05PM (#8557598)
an example that comes to mind, Pony ORM uses it to convert a generator expression to SQL, https://stackoverflow.com/questions/16115713/how-pony-orm-do...
Re:Understanding Python Bytecode by rev_null on Tuesday November 04, 2014 @03:12AM (#8555552)
"I came here to HAVE_ARGUMENT!"

"Oh! I'm sorry. This is abuse."