Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Feb 29, 2016
1 parent c642ce7 commit eac4332
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ ConcreteInstr

.. attribute:: arg

Argument value (``int`` in range ``0``..``2147483647``), or :data:`UNSET`.
Argument value (``int`` in range ``0``..\ ``2147483647``), or
:data:`UNSET`. Changing the argument value can change the instruction
size (:attr:`size`).

.. attribute:: size

Size of the instruction in bytes: between ``1`` byte (no agument) and
``6`` bytes (extended argument).
Read-only size of the instruction in bytes: between ``1`` byte (no
agument) and ``6`` bytes (extended argument).

Static method:

Expand Down Expand Up @@ -235,6 +237,10 @@ BaseBytecode

Flags (``int``).

.. attribute:: freevars

List of free variable names (``list`` of ``str``), default: empty list.

.. attribute:: kw_only_argcount

Keyword-only argument count (``int``), default: ``0``.
Expand Down Expand Up @@ -293,10 +299,6 @@ ConcreteBytecode

List of constants (``list``), default: empty list.

.. attribute:: freevars

List of free variable names (``list`` of ``str``), default: empty list.

.. attribute:: names

List of names (``list`` of ``str``), default: empty list.
Expand Down Expand Up @@ -333,6 +335,8 @@ Block

List of abstract instructions (:class:`Instr`). Inherit from :class:`list`.

Labels (:class:`Label`) must not be used inline in blocks.

Attributes:

.. attribute:: label
Expand All @@ -356,7 +360,7 @@ BytecodeBlocks
It is possible to use concrete instructions (:class:`ConcreteInstr`) in
blocks, but abstract instructions are preferred.

Labels must not be used in blocks.
Labels (:class:`Label`) must not be used inline in blocks.

Attributes:

Expand Down

0 comments on commit eac4332

Please sign in to comment.