4 ms·
The two semantic operations are increment then store.
by rkeene2 5y ago
The two semantic operations are increment then store.
- deleted 5y ago[deleted]
- chrisseaton 5y agoThat's an implementation detail based on a particular architecture. A different architecture could have an atomic increment operation if it wanted to, and Python could use it for this syntax.
- squeaky-clean 5y agoIn Python though, there's really only one architecture. Yes there's PyPy and such, but CPython and it's bytecode is both the official implementation and official spec of Python. Maybe the underlying hardware has those operations, but the Python VM does not.