rest25/library/compiler.rst => rest262/library/compiler.rst
f1
2.. _compiler:
3
4***********************
5Python compiler package
6***********************
7
n8+.. deprecated:: 2.6
9+   The :mod:`compiler` package has been removed in Python 3.0.
10+ 
8.. sectionauthor:: Jeremy Hylton <jeremy@zope.com>
9
10
11The Python compiler package is a tool for analyzing Python source code and
12generating Python bytecode.  The compiler contains libraries to generate an
n13-abstract syntax tree from Python source code and to generate Python bytecode
n16+abstract syntax tree from Python source code and to generate Python
14-from the tree.
17+:term:`bytecode` from the tree.
15
16The :mod:`compiler` package is a Python source to bytecode translator written in
17Python.  It uses the built-in parser and standard :mod:`parser` module to
18generated a concrete syntax tree.  This tree is used to generate an abstract
19syntax tree (AST) and then Python bytecode.
20
21The full functionality of the package duplicates the builtin compiler provided
22with the Python interpreter.  It is intended to match its behavior almost
23exactly.  Why implement another compiler that does the same thing?  The package
24is useful for a variety of purposes.  It can be modified more easily than the
25builtin compiler.  The AST it generates is useful for analyzing Python source
26code.
27
28This chapter explains how the various components of the :mod:`compiler` package
29work.  It blends reference material with a tutorial.
30
n31-The following modules are part of the :mod:`compiler` package:
32- 
33- 
34-.. toctree::
35- 
36-   ast.rst
37
38The basic interface
39===================
40
41.. module:: compiler
n39+   :synopsis: Python code compiler written in Python.
40+   :deprecated:
42
43
44The top-level of the package defines four functions.  If you import
45:mod:`compiler`, you will get these functions and a collection of modules
46contained in the package.
47
48
49.. function:: parse(buf)
107Python Abstract Syntax
108======================
109
110The :mod:`compiler.ast` module defines an abstract syntax for Python.  In the
111abstract syntax tree, each node represents a syntactic construct.  The root of
112the tree is :class:`Module` object.
113
114The abstract syntax offers a higher level interface to parsed Python source
n115-code.  The `parser <http://www.python.org/doc/current/lib/module-parser.html>`_
n114+code.  The :mod:`parser` module and the compiler written in C for the Python
116-module and the compiler written in C for the Python interpreter use a concrete
115+interpreter use a concrete syntax tree.  The concrete syntax is tied closely to
117-syntax tree.  The concrete syntax is tied closely to the grammar description
116+the grammar description used for the Python parser.  Instead of a single node
118-used for the Python parser.  Instead of a single node for a construct, there are
117+for a construct, there are often several levels of nested nodes that are
119-often several levels of nested nodes that are introduced by Python's precedence
118+introduced by Python's precedence rules.
120-rules.
121
122The abstract syntax tree is created by the :mod:`compiler.transformer` module.
123The transformer relies on the builtin Python parser to generate a concrete
124syntax tree.  It generates an abstract syntax tree from the concrete tree.
125
126.. index::
127   single: Stein, Greg
128   single: Tutt, Bill
154   example, the :attr:`bases` attribute of the :class:`Class` node, is bound to a
155   list of base class nodes, and the :attr:`doc` attribute is bound to a single
156   node.
157
158   Each :class:`Node` instance has a :attr:`lineno` attribute which may be
159   ``None``.  XXX Not sure what the rules are for which nodes will have a useful
160   lineno.
161
n162-All :class:`Node` objects offer the following methods:
n160+   All :class:`Node` objects offer the following methods:
163
164
n165-.. method:: Node.getChildren()
n163+   .. method:: getChildren()
166
n167-   Returns a flattened list of the child nodes and objects in the order they occur.
n165+      Returns a flattened list of the child nodes and objects in the order they
168-   Specifically, the order of the nodes is the order in which they appear in the
166+      occur.  Specifically, the order of the nodes is the order in which they
169-   Python grammar.  Not all of the children are :class:`Node` instances.  The names
167+      appear in the Python grammar.  Not all of the children are :class:`Node`
170-   of functions and classes, for example, are plain strings.
168+      instances.  The names of functions and classes, for example, are plain
169+      strings.
171
172
n173-.. method:: Node.getChildNodes()
n172+   .. method:: getChildNodes()
174
n175-   Returns a flattened list of the child nodes in the order they occur.  This
n174+      Returns a flattened list of the child nodes in the order they occur.  This
176-   method is like :meth:`getChildren`, except that it only returns those children
175+      method is like :meth:`getChildren`, except that it only returns those
177-   that are :class:`Node` instances.
176+      children that are :class:`Node` instances.
177+ 
178
179Two examples illustrate the general structure of :class:`Node` classes.  The
180:keyword:`while` statement is defined by the following grammar production::
181
182   while_stmt:     "while" expression ":" suite
183                  ["else" ":" suite]
184
185The :class:`While` node has three attributes: :attr:`test`, :attr:`body`, and
209The following table lists each of the :class:`Node` subclasses defined in
210:mod:`compiler.ast` and each of the public attributes available on their
211instances.  The values of most of the attributes are themselves :class:`Node`
212instances or sequences of instances.  When the value is something other than an
213instance, the type is noted in the comment.  The attributes are listed in the
214order in which they are returned by :meth:`getChildren` and
215:meth:`getChildNodes`.
216
n217-XXX: input{asttable} :XXX
n217++-----------------------+--------------------+---------------------------------+
218+| Node type             | Attribute          | Value                           |
219++=======================+====================+=================================+
220+| :class:`Add`          | :attr:`left`       | left operand                    |
221++-----------------------+--------------------+---------------------------------+
222+|                       | :attr:`right`      | right operand                   |
223++-----------------------+--------------------+---------------------------------+
224+| :class:`And`          | :attr:`nodes`      | list of operands                |
225++-----------------------+--------------------+---------------------------------+
226+| :class:`AssAttr`      |                    | *attribute as target of         |
227+|                       |                    | assignment*                     |
228++-----------------------+--------------------+---------------------------------+
229+|                       | :attr:`expr`       | expression on the left-hand     |
230+|                       |                    | side of the dot                 |
231++-----------------------+--------------------+---------------------------------+
232+|                       | :attr:`attrname`   | the attribute name, a string    |
233++-----------------------+--------------------+---------------------------------+
234+|                       | :attr:`flags`      | XXX                             |
235++-----------------------+--------------------+---------------------------------+
236+| :class:`AssList`      | :attr:`nodes`      | list of list elements being     |
237+|                       |                    | assigned to                     |
238++-----------------------+--------------------+---------------------------------+
239+| :class:`AssName`      | :attr:`name`       | name being assigned to          |
240++-----------------------+--------------------+---------------------------------+
241+|                       | :attr:`flags`      | XXX                             |
242++-----------------------+--------------------+---------------------------------+
243+| :class:`AssTuple`     | :attr:`nodes`      | list of tuple elements being    |
244+|                       |                    | assigned to                     |
245++-----------------------+--------------------+---------------------------------+
246+| :class:`Assert`       | :attr:`test`       | the expression to be tested     |
247++-----------------------+--------------------+---------------------------------+
248+|                       | :attr:`fail`       | the value of the                |
249+|                       |                    | :exc:`AssertionError`           |
250++-----------------------+--------------------+---------------------------------+
251+| :class:`Assign`       | :attr:`nodes`      | a list of assignment targets,   |
252+|                       |                    | one per equal sign              |
253++-----------------------+--------------------+---------------------------------+
254+|                       | :attr:`expr`       | the value being assigned        |
255++-----------------------+--------------------+---------------------------------+
256+| :class:`AugAssign`    | :attr:`node`       |                                 |
257++-----------------------+--------------------+---------------------------------+
258+|                       | :attr:`op`         |                                 |
259++-----------------------+--------------------+---------------------------------+
260+|                       | :attr:`expr`       |                                 |
261++-----------------------+--------------------+---------------------------------+
262+| :class:`Backquote`    | :attr:`expr`       |                                 |
263++-----------------------+--------------------+---------------------------------+
264+| :class:`Bitand`       | :attr:`nodes`      |                                 |
265++-----------------------+--------------------+---------------------------------+
266+| :class:`Bitor`        | :attr:`nodes`      |                                 |
267++-----------------------+--------------------+---------------------------------+
268+| :class:`Bitxor`       | :attr:`nodes`      |                                 |
269++-----------------------+--------------------+---------------------------------+
270+| :class:`Break`        |                    |                                 |
271++-----------------------+--------------------+---------------------------------+
272+| :class:`CallFunc`     | :attr:`node`       | expression for the callee       |
273++-----------------------+--------------------+---------------------------------+
274+|                       | :attr:`args`       | a list of arguments             |
275++-----------------------+--------------------+---------------------------------+
276+|                       | :attr:`star_args`  | the extended \*-arg value       |
277++-----------------------+--------------------+---------------------------------+
278+|                       | :attr:`dstar_args` | the extended \*\*-arg value     |
279++-----------------------+--------------------+---------------------------------+
280+| :class:`Class`        | :attr:`name`       | the name of the class, a string |
281++-----------------------+--------------------+---------------------------------+
282+|                       | :attr:`bases`      | a list of base classes          |
283++-----------------------+--------------------+---------------------------------+
284+|                       | :attr:`doc`        | doc string, a string or         |
285+|                       |                    | ``None``                        |
286++-----------------------+--------------------+---------------------------------+
287+|                       | :attr:`code`       | the body of the class statement |
288++-----------------------+--------------------+---------------------------------+
289+| :class:`Compare`      | :attr:`expr`       |                                 |
290++-----------------------+--------------------+---------------------------------+
291+|                       | :attr:`ops`        |                                 |
292++-----------------------+--------------------+---------------------------------+
293+| :class:`Const`        | :attr:`value`      |                                 |
294++-----------------------+--------------------+---------------------------------+
295+| :class:`Continue`     |                    |                                 |
296++-----------------------+--------------------+---------------------------------+
297+| :class:`Decorators`   | :attr:`nodes`      | List of function decorator      |
298+|                       |                    | expressions                     |
299++-----------------------+--------------------+---------------------------------+
300+| :class:`Dict`         | :attr:`items`      |                                 |
301++-----------------------+--------------------+---------------------------------+
302+| :class:`Discard`      | :attr:`expr`       |                                 |
303++-----------------------+--------------------+---------------------------------+
304+| :class:`Div`          | :attr:`left`       |                                 |
305++-----------------------+--------------------+---------------------------------+
306+|                       | :attr:`right`      |                                 |
307++-----------------------+--------------------+---------------------------------+
308+| :class:`Ellipsis`     |                    |                                 |
309++-----------------------+--------------------+---------------------------------+
310+| :class:`Expression`   | :attr:`node`       |                                 |
311++-----------------------+--------------------+---------------------------------+
312+| :class:`Exec`         | :attr:`expr`       |                                 |
313++-----------------------+--------------------+---------------------------------+
314+|                       | :attr:`locals`     |                                 |
315++-----------------------+--------------------+---------------------------------+
316+|                       | :attr:`globals`    |                                 |
317++-----------------------+--------------------+---------------------------------+
318+| :class:`FloorDiv`     | :attr:`left`       |                                 |
319++-----------------------+--------------------+---------------------------------+
320+|                       | :attr:`right`      |                                 |
321++-----------------------+--------------------+---------------------------------+
322+| :class:`For`          | :attr:`assign`     |                                 |
323++-----------------------+--------------------+---------------------------------+
324+|                       | :attr:`list`       |                                 |
325++-----------------------+--------------------+---------------------------------+
326+|                       | :attr:`body`       |                                 |
327++-----------------------+--------------------+---------------------------------+
328+|                       | :attr:`else_`      |                                 |
329++-----------------------+--------------------+---------------------------------+
330+| :class:`From`         | :attr:`modname`    |                                 |
331++-----------------------+--------------------+---------------------------------+
332+|                       | :attr:`names`      |                                 |
333++-----------------------+--------------------+---------------------------------+
334+| :class:`Function`     | :attr:`decorators` | :class:`Decorators` or ``None`` |
335++-----------------------+--------------------+---------------------------------+
336+|                       | :attr:`name`       | name used in def, a string      |
337++-----------------------+--------------------+---------------------------------+
338+|                       | :attr:`argnames`   | list of argument names, as      |
339+|                       |                    | strings                         |
340++-----------------------+--------------------+---------------------------------+
341+|                       | :attr:`defaults`   | list of default values          |
342++-----------------------+--------------------+---------------------------------+
343+|                       | :attr:`flags`      | xxx                             |
344++-----------------------+--------------------+---------------------------------+
345+|                       | :attr:`doc`        | doc string, a string or         |
346+|                       |                    | ``None``                        |
347++-----------------------+--------------------+---------------------------------+
348+|                       | :attr:`code`       | the body of the function        |
349++-----------------------+--------------------+---------------------------------+
350+| :class:`GenExpr`      | :attr:`code`       |                                 |
351++-----------------------+--------------------+---------------------------------+
352+| :class:`GenExprFor`   | :attr:`assign`     |                                 |
353++-----------------------+--------------------+---------------------------------+
354+|                       | :attr:`iter`       |                                 |
355++-----------------------+--------------------+---------------------------------+
356+|                       | :attr:`ifs`        |                                 |
357++-----------------------+--------------------+---------------------------------+
358+| :class:`GenExprIf`    | :attr:`test`       |                                 |
359++-----------------------+--------------------+---------------------------------+
360+| :class:`GenExprInner` | :attr:`expr`       |                                 |
361++-----------------------+--------------------+---------------------------------+
362+|                       | :attr:`quals`      |                                 |
363++-----------------------+--------------------+---------------------------------+
364+| :class:`Getattr`      | :attr:`expr`       |                                 |
365++-----------------------+--------------------+---------------------------------+
366+|                       | :attr:`attrname`   |                                 |
367++-----------------------+--------------------+---------------------------------+
368+| :class:`Global`       | :attr:`names`      |                                 |
369++-----------------------+--------------------+---------------------------------+
370+| :class:`If`           | :attr:`tests`      |                                 |
371++-----------------------+--------------------+---------------------------------+
372+|                       | :attr:`else_`      |                                 |
373++-----------------------+--------------------+---------------------------------+
374+| :class:`Import`       | :attr:`names`      |                                 |
375++-----------------------+--------------------+---------------------------------+
376+| :class:`Invert`       | :attr:`expr`       |                                 |
377++-----------------------+--------------------+---------------------------------+
378+| :class:`Keyword`      | :attr:`name`       |                                 |
379++-----------------------+--------------------+---------------------------------+
380+|                       | :attr:`expr`       |                                 |
381++-----------------------+--------------------+---------------------------------+
382+| :class:`Lambda`       | :attr:`argnames`   |                                 |
383++-----------------------+--------------------+---------------------------------+
384+|                       | :attr:`defaults`   |                                 |
385++-----------------------+--------------------+---------------------------------+
386+|                       | :attr:`flags`      |                                 |
387++-----------------------+--------------------+---------------------------------+
388+|                       | :attr:`code`       |                                 |
389++-----------------------+--------------------+---------------------------------+
390+| :class:`LeftShift`    | :attr:`left`       |                                 |
391++-----------------------+--------------------+---------------------------------+
392+|                       | :attr:`right`      |                                 |
393++-----------------------+--------------------+---------------------------------+
394+| :class:`List`         | :attr:`nodes`      |                                 |
395++-----------------------+--------------------+---------------------------------+
396+| :class:`ListComp`     | :attr:`expr`       |                                 |
397++-----------------------+--------------------+---------------------------------+
398+|                       | :attr:`quals`      |                                 |
399++-----------------------+--------------------+---------------------------------+
400+| :class:`ListCompFor`  | :attr:`assign`     |                                 |
401++-----------------------+--------------------+---------------------------------+
402+|                       | :attr:`list`       |                                 |
403++-----------------------+--------------------+---------------------------------+
404+|                       | :attr:`ifs`        |                                 |
405++-----------------------+--------------------+---------------------------------+
406+| :class:`ListCompIf`   | :attr:`test`       |                                 |
407++-----------------------+--------------------+---------------------------------+
408+| :class:`Mod`          | :attr:`left`       |                                 |
409++-----------------------+--------------------+---------------------------------+
410+|                       | :attr:`right`      |                                 |
411++-----------------------+--------------------+---------------------------------+
412+| :class:`Module`       | :attr:`doc`        | doc string, a string or         |
413+|                       |                    | ``None``                        |
414++-----------------------+--------------------+---------------------------------+
415+|                       | :attr:`node`       | body of the module, a           |
416+|                       |                    | :class:`Stmt`                   |
417++-----------------------+--------------------+---------------------------------+
418+| :class:`Mul`          | :attr:`left`       |                                 |
419++-----------------------+--------------------+---------------------------------+
420+|                       | :attr:`right`      |                                 |
421++-----------------------+--------------------+---------------------------------+
422+| :class:`Name`         | :attr:`name`       |                                 |
423++-----------------------+--------------------+---------------------------------+
424+| :class:`Not`          | :attr:`expr`       |                                 |
425++-----------------------+--------------------+---------------------------------+
426+| :class:`Or`           | :attr:`nodes`      |                                 |
427++-----------------------+--------------------+---------------------------------+
428+| :class:`Pass`         |                    |                                 |
429++-----------------------+--------------------+---------------------------------+
430+| :class:`Power`        | :attr:`left`       |                                 |
431++-----------------------+--------------------+---------------------------------+
432+|                       | :attr:`right`      |                                 |
433++-----------------------+--------------------+---------------------------------+
434+| :class:`Print`        | :attr:`nodes`      |                                 |
435++-----------------------+--------------------+---------------------------------+
436+|                       | :attr:`dest`       |                                 |
437++-----------------------+--------------------+---------------------------------+
438+| :class:`Printnl`      | :attr:`nodes`      |                                 |
439++-----------------------+--------------------+---------------------------------+
440+|                       | :attr:`dest`       |                                 |
441++-----------------------+--------------------+---------------------------------+
442+| :class:`Raise`        | :attr:`expr1`      |                                 |
443++-----------------------+--------------------+---------------------------------+
444+|                       | :attr:`expr2`      |                                 |
445++-----------------------+--------------------+---------------------------------+
446+|                       | :attr:`expr3`      |                                 |
447++-----------------------+--------------------+---------------------------------+
448+| :class:`Return`       | :attr:`value`      |                                 |
449++-----------------------+--------------------+---------------------------------+
450+| :class:`RightShift`   | :attr:`left`       |                                 |
451++-----------------------+--------------------+---------------------------------+
452+|                       | :attr:`right`      |                                 |
453++-----------------------+--------------------+---------------------------------+
454+| :class:`Slice`        | :attr:`expr`       |                                 |
455++-----------------------+--------------------+---------------------------------+
456+|                       | :attr:`flags`      |                                 |
457++-----------------------+--------------------+---------------------------------+
458+|                       | :attr:`lower`      |                                 |
459++-----------------------+--------------------+---------------------------------+
460+|                       | :attr:`upper`      |                                 |
461++-----------------------+--------------------+---------------------------------+
462+| :class:`Sliceobj`     | :attr:`nodes`      | list of statements              |
463++-----------------------+--------------------+---------------------------------+
464+| :class:`Stmt`         | :attr:`nodes`      |                                 |
465++-----------------------+--------------------+---------------------------------+
466+| :class:`Sub`          | :attr:`left`       |                                 |
467++-----------------------+--------------------+---------------------------------+
468+|                       | :attr:`right`      |                                 |
469++-----------------------+--------------------+---------------------------------+
470+| :class:`Subscript`    | :attr:`expr`       |                                 |
471++-----------------------+--------------------+---------------------------------+
472+|                       | :attr:`flags`      |                                 |
473++-----------------------+--------------------+---------------------------------+
474+|                       | :attr:`subs`       |                                 |
475++-----------------------+--------------------+---------------------------------+
476+| :class:`TryExcept`    | :attr:`body`       |                                 |
477++-----------------------+--------------------+---------------------------------+
478+|                       | :attr:`handlers`   |                                 |
479++-----------------------+--------------------+---------------------------------+
480+|                       | :attr:`else_`      |                                 |
481++-----------------------+--------------------+---------------------------------+
482+| :class:`TryFinally`   | :attr:`body`       |                                 |
483++-----------------------+--------------------+---------------------------------+
484+|                       | :attr:`final`      |                                 |
485++-----------------------+--------------------+---------------------------------+
486+| :class:`Tuple`        | :attr:`nodes`      |                                 |
487++-----------------------+--------------------+---------------------------------+
488+| :class:`UnaryAdd`     | :attr:`expr`       |                                 |
489++-----------------------+--------------------+---------------------------------+
490+| :class:`UnarySub`     | :attr:`expr`       |                                 |
491++-----------------------+--------------------+---------------------------------+
492+| :class:`While`        | :attr:`test`       |                                 |
493++-----------------------+--------------------+---------------------------------+
494+|                       | :attr:`body`       |                                 |
495++-----------------------+--------------------+---------------------------------+
496+|                       | :attr:`else_`      |                                 |
497++-----------------------+--------------------+---------------------------------+
498+| :class:`With`         | :attr:`expr`       |                                 |
499++-----------------------+--------------------+---------------------------------+
500+|                       | :attr:`vars`       |                                 |
501++-----------------------+--------------------+---------------------------------+
502+|                       | :attr:`body`       |                                 |
503++-----------------------+--------------------+---------------------------------+
504+| :class:`Yield`        | :attr:`value`      |                                 |
505++-----------------------+--------------------+---------------------------------+
506+ 
218
219Assignment nodes
220----------------
221
222There is a collection of nodes used to represent assignments.  Each assignment
223statement in the source code becomes a single :class:`Assign` node in the AST.
224The :attr:`nodes` attribute is a list that contains a node for each assignment
225target.  This is necessary because assignment can be chained, e.g. ``a = b =
265In the interactive interpreter session below, I have reformatted the long AST
266reprs for readability.  The AST reprs use unqualified class names.  If you want
267to create an instance from a repr, you must import the class names from the
268:mod:`compiler.ast` module. ::
269
270   >>> import compiler
271   >>> mod = compiler.parseFile("/tmp/doublelib.py")
272   >>> mod
n273-   Module('This is an example module.\n\nThis is the docstring.\n', 
n562+   Module('This is an example module.\n\nThis is the docstring.\n',
274          Stmt([Function(None, 'double', ['x'], [], 0,
n275-                         'Return twice the argument', 
n564+                         'Return twice the argument',
276                         Stmt([Return(Mul((Name('x'), Const(2))))]))]))
277   >>> from compiler.ast import *
n278-   >>> Module('This is an example module.\n\nThis is the docstring.\n', 
n567+   >>> Module('This is an example module.\n\nThis is the docstring.\n',
279   ...    Stmt([Function(None, 'double', ['x'], [], 0,
n280-   ...                   'Return twice the argument', 
n569+   ...                   'Return twice the argument',
281   ...                   Stmt([Return(Mul((Name('x'), Const(2))))]))]))
n282-   Module('This is an example module.\n\nThis is the docstring.\n', 
n571+   Module('This is an example module.\n\nThis is the docstring.\n',
283          Stmt([Function(None, 'double', ['x'], [], 0,
n284-                         'Return twice the argument', 
n573+                         'Return twice the argument',
285                         Stmt([Return(Mul((Name('x'), Const(2))))]))]))
286   >>> mod.doc
287   'This is an example module.\n\nThis is the docstring.\n'
288   >>> for node in mod.node.nodes:
289   ...     print node
n290-   ... 
n579+   ...
291   Function(None, 'double', ['x'], [], 0, 'Return twice the argument',
292            Stmt([Return(Mul((Name('x'), Const(2))))]))
293   >>> func = mod.node.nodes[0]
294   >>> func.code
295   Stmt([Return(Mul((Name('x'), Const(2))))])
296
297
298Using Visitors to Walk ASTs
325   node as its first argument.
326
327   The visitor method for a particular node type can control how child nodes are
328   visited during the walk.  The :class:`ASTVisitor` modifies the visitor argument
329   by adding a visit method to the visitor; this method can be used to visit a
330   particular child node.  If no visitor is found for a particular node type, the
331   :meth:`default` method is called.
332
n333-:class:`ASTVisitor` objects have the following methods:
n622+   :class:`ASTVisitor` objects have the following methods:
334
n335-XXX describe extra arguments
n624+   XXX describe extra arguments
336
337
n338-.. method:: ASTVisitor.default(node[, ...])
n627+   .. method:: default(node[, ...])
339
340
n341-.. method:: ASTVisitor.dispatch(node[, ...])
n630+   .. method:: dispatch(node[, ...])
342
343
n344-.. method:: ASTVisitor.preorder(tree, visitor)
n633+   .. method:: preorder(tree, visitor)
345
346
347Bytecode Generation
348===================
349
350The code generator is a visitor that emits bytecodes.  Each visit method can
351call the :meth:`emit` method to emit a new bytecode.  The basic code generator
352is specialized for modules, classes, and functions.  An assembler converts that
353emitted instructions to the low-level bytecode format.  It handles things like
t354-generator of constant lists of code objects and calculation of jump offsets.
t643+generation of constant lists of code objects and calculation of jump offsets.
355
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op