Skip to content

Commit

Permalink
example: remove useless lineno=
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Feb 29, 2016
1 parent d04728d commit 0bc3423
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
bytecode
********

``bytecode`` is a Python module to modify bytecode.
``bytecode`` is a Python module to generate and modify bytecode.

* `bytecode project homepage at GitHub
<https://github.com/haypo/bytecode>`_ (code, bugs)
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
bytecode
********

``bytecode`` is a Python module to modify bytecode.
``bytecode`` is a Python module to generate and modify bytecode.

* `bytecode project homepage at GitHub
<https://github.com/haypo/bytecode>`_ (code, bugs)
Expand Down
26 changes: 13 additions & 13 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ Bytecode of ``for x in (1, 2, 3): print(x)``::
loop_start = Label()
loop_done = Label()
loop_exit = Label()
code = Bytecode([Instr('SETUP_LOOP', loop_exit, lineno=2),
Instr('LOAD_CONST', (1, 2, 3), lineno=2),
Instr('GET_ITER', lineno=2),
code = Bytecode([Instr('SETUP_LOOP', loop_exit),
Instr('LOAD_CONST', (1, 2, 3)),
Instr('GET_ITER'),
loop_start,
Instr('FOR_ITER', loop_done, lineno=2),
Instr('STORE_NAME', 'x', lineno=2),
Instr('LOAD_NAME', 'print', lineno=3),
Instr('LOAD_NAME', 'x', lineno=3),
Instr('CALL_FUNCTION', 1, lineno=3),
Instr('POP_TOP', lineno=3),
Instr('JUMP_ABSOLUTE', loop_start, lineno=3),
Instr('FOR_ITER', loop_done),
Instr('STORE_NAME', 'x'),
Instr('LOAD_NAME', 'print'),
Instr('LOAD_NAME', 'x'),
Instr('CALL_FUNCTION', 1),
Instr('POP_TOP'),
Instr('JUMP_ABSOLUTE', loop_start),
loop_done,
Instr('POP_BLOCK', lineno=3),
Instr('POP_BLOCK'),
loop_exit,
Instr('LOAD_CONST', None, lineno=3),
Instr('RETURN_VALUE', lineno=3)])
Instr('LOAD_CONST', None),
Instr('RETURN_VALUE')])

# the conversion to Python code object resolve jump targets:
# replace abstract labels with concrete offsets
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

VERSION = '0.3'

DESCRIPTION = 'Python module to modify bytecode'
DESCRIPTION = 'Python module to generate and modify bytecode'
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down

0 comments on commit 0bc3423

Please sign in to comment.