¡@

Home 

python Programming Glossary: store_global

How should I understand the output of dis.dis?

http://stackoverflow.com/questions/12673074/how-should-i-understand-the-output-of-dis-dis

JUMP_IF_TRUE_OR_POP 11889 6 JUMP_FORWARD 28019 to 28028 9 STORE_GLOBAL 27756 27756 12 LOAD_NAME 29811 29811 15 STORE_SLICE 0 16 LOAD_CONST..

Is a variable swap guaranteed to be atomic in python?

http://stackoverflow.com/questions/2623086/is-a-variable-swap-guaranteed-to-be-atomic-in-python

3 0 LOAD_GLOBAL 0 y 3 LOAD_GLOBAL 1 x 6 ROT_TWO 7 STORE_GLOBAL 1 x 10 STORE_GLOBAL 0 y 13 LOAD_CONST 0 None 16 RETURN_VALUE.. 0 y 3 LOAD_GLOBAL 1 x 6 ROT_TWO 7 STORE_GLOBAL 1 x 10 STORE_GLOBAL 0 y 13 LOAD_CONST 0 None 16 RETURN_VALUE It doesn't appear that.. bytecodes before or after the ROT_TWO and between the STORE_GLOBAL bytecodes. If you want to swap two variables atomically you'll..