Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> c = compile("1", "", "eval")
- >>> dis.dis(c)
- 1 0 LOAD_CONST 0 (1)
- 3 RETURN_VALUE
- >>> eval(c)
- 1
- >>> c2 = type(c)(c.co_argcount, c.co_kwonlyargcount, c.co_nlocals, c.co_stacksize, c.co_flags, c.co_code[:3], c.co_consts, c.co_names, c.co_varnames, c.co_filename, c.co_name, c.co_firstlineno, c.co_lnotab)
- >>> dis.dis(c2)
- 1 0 LOAD_CONST 0 (1)
- >>> eval(c2)
- XXX lineno: 1, opcode: 100
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "", line 1, in <module>
- SystemError: unknown opcode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement