atomic operations

Lei Chen llchen223 at
Mon Jan 21 21:17:27 EST 2002


Newbie question:

Let say that L = [1,2,3]

I read in the FAQ that L.append(4) and L.pop() are atomic operations
under Python.  Are L.remove(2) and L[:0] = [L.pop()] atomic operations
too?  The FAQ says each bytecode instruction is atomic, so I guess the
question is whether each of the above operations are compiled as a
single bytecode instruction...


More information about the Python-list mailing list