Closed faustinoaq closed 6 months ago
A 10x Hello World in a pure-Python Python bytecode interpreter.
Based on https://github.com/nedbat/byterun adjusted to run in a single file!
No need for documentation the code explain itself
$ python3 complication.py <code object <module> at 0x7fd6cda9aa20, file "main.py", line 1> 1 0 LOAD_CONST 0 ('Hello World!\n') 2 STORE_NAME 0 (HW) 2 4 LOAD_NAME 1 (print) 6 LOAD_NAME 0 (HW) 8 LOAD_NAME 2 (len) 10 LOAD_NAME 0 (HW) 12 CALL_FUNCTION 1 14 LOAD_CONST 1 (3) 16 BINARY_SUBTRACT 18 BINARY_MULTIPLY 20 CALL_FUNCTION 1 22 POP_TOP 24 LOAD_CONST 2 (None) 26 RETURN_VALUE Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World!
A 10x Hello World in a pure-Python Python bytecode interpreter.
Based on https://github.com/nedbat/byterun adjusted to run in a single file!
No need for documentation the code explain itself