¡@

Home 

python Programming Glossary: build_list

Accessing class variables from a list comprehension in the class definition

http://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition

1 __module__ 3 6 LOAD_CONST 0 5 9 STORE_NAME 2 x 4 12 BUILD_LIST 0 15 LOAD_NAME 3 range 18 LOAD_CONST 1 1 21 CALL_FUNCTION 1.. ' 1 None dis.dis foo.__code__.co_consts 1 .co_consts 2 4 0 BUILD_LIST 0 3 LOAD_FAST 0 .0 6 FOR_ITER 12 to 21 9 STORE_FAST 1 i .. Foo ... dis.dis foo.__code__.co_consts 2 .co_consts 2 5 0 BUILD_LIST 0 3 LOAD_FAST 0 .0 6 FOR_ITER 12 to 21 9 STORE_FAST 1 i ..

Are tuples more efficient than lists in Python?

http://stackoverflow.com/questions/68630/are-tuples-more-efficient-than-lists-in-python

2 6 LOAD_CONST 3 3 9 LOAD_CONST 4 4 12 LOAD_CONST 5 5 15 BUILD_LIST 5 18 STORE_FAST 0 x 3 21 LOAD_FAST 0 x 24 LOAD_CONST 2 2 27..

In Python, what is the difference between “.append()” and “+= []”?

http://stackoverflow.com/questions/725782/in-python-what-is-the-difference-between-append-and

wastes cycles in LOAD_ATTR CALL_FUNCTION and version in BUILD_LIST . Apparently BUILD_LIST outweighs LOAD_ATTR CALL_FUNCTION ... CALL_FUNCTION and version in BUILD_LIST . Apparently BUILD_LIST outweighs LOAD_ATTR CALL_FUNCTION . import dis dis.dis compile.. import dis dis.dis compile s s.append 'spam' '' 'exec' 1 0 BUILD_LIST 0 3 STORE_NAME 0 s 6 LOAD_NAME 0 s 9 LOAD_ATTR 1 append 12..