Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
question about a command like 'goto ' in Python's bytecode or it'sjust a compiler optimization?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Diez B. Roggisch, post: 3882662"] .... for i in xrange(10): .... if i == 5: .... break .... if i == 4: .... continue .... i *= 100 .... 2 0 SETUP_LOOP 68 (to 71) 3 LOAD_GLOBAL 0 (xrange) 6 LOAD_CONST 1 (10) 9 CALL_FUNCTION 1 12 GET_ITER 16 STORE_FAST 0 (i) 3 19 LOAD_FAST 0 (i) 22 LOAD_CONST 2 (5) 25 COMPARE_OP 2 (==) 28 JUMP_IF_FALSE 5 (to 36) 31 POP_TOP 4 32 BREAK_LOOP 33 JUMP_FORWARD 1 (to 37) 5 >> 37 LOAD_FAST 0 (i) 40 LOAD_CONST 3 (4) 43 COMPARE_OP 2 (==) 46 JUMP_IF_FALSE 7 (to 56) 49 POP_TOP 6 50 JUMP_ABSOLUTE 13 53 JUMP_FORWARD 1 (to 57) 7 >> 57 LOAD_FAST 0 (i) 60 LOAD_CONST 4 (100) 63 INPLACE_MULTIPLY 64 STORE_FAST 0 (i) 67 JUMP_ABSOLUTE 13 Pretty much everything with control-structures. Diez [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
question about a command like 'goto ' in Python's bytecode or it'sjust a compiler optimization?
Top