This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients brett.cannon, exarkun, georg.brandl, terry.reedy
Date 2010-02-05.20:44:26
SpamBayes Score 6.6256973e-09
Marked as misclassified No
Message-id <1265402668.44.0.915815402754.issue7829@psf.upfronthosting.co.za>
In-reply-to
Content
The doc begins
"30.12. dis — Disassembler for Python bytecode
The dis module supports the analysis of Python bytecode by disassembling it. Since there is no Python assembler, this module defines the Python assembly language. The Python bytecode which this module takes as an input is defined in the file Include/opcode.h and used by the compiler and the interpreter."

This goes back to when python.exe (CPython) was the only implementation. "Python bytecode" is no longer appropriate. It should be changed to CPython bytecode. My suggestion for a possible update:

30.12. dis — Disassembler for CPython bytecode
CPython currently compiles Python source code to a custom bytecode that is defined by the CPytyon source file Include/opcode.h and explained below. While such implementation details are subject to change in any CPython x.y version, the dis module supports the analysis of current bytecode by disassembling it to a format similar to assembly language."

Calling it an actual assembly language, as the current doc does, implies to me that there is/should be an assembler (which Guido has said there should not be).

"30.12.1. Python Bytecode Instructions
The Python compiler ..."

Python -> CPython

In the glossary:
"bytecode 
Python source code is compiled into bytecode, the internal representation of a Python program in the interpret"
=> something like
"bytecode
CPython currently compiles Python source code to an internal bytecode representation that it uses to execute the program. Some other implementations do something similar."

These suggestions touch on the larger issue of differentiating and disentangling language doc from CPython implementation doc. I support this even though I have never used any of the other implementations.
History
Date User Action Args
2010-02-05 20:44:28terry.reedysetrecipients: + terry.reedy, brett.cannon, georg.brandl, exarkun
2010-02-05 20:44:28terry.reedysetmessageid: <1265402668.44.0.915815402754.issue7829@psf.upfronthosting.co.za>
2010-02-05 20:44:27terry.reedylinkissue7829 messages
2010-02-05 20:44:26terry.reedycreate