News for hackers. Stuff that matters.
Re:Data races in Python, despite the Global Interpreter Lock by chrisseaton on Tuesday February 22, 2022 @04:54AM (#30425941)
Because that's what the user wrote. You can reason about the operation in terms of smaller operations (such as read, add, store) but not more coarse operations, because the user could have just written the single operation.
Re:Data races in Python, despite the Global Interpreter Lock by Thorrez on Thursday February 24, 2022 @12:58AM (#30451001)
Consider the situation "counter = counter + get_value()". That also can be reasoned about in terms of smaller operations, but not more coarse operations, because the user could have just written the single operation.

We wouldn't expect this to be atomic, because the get_value() function could do tons of things, and we don't expect all that to be atomic. It doesn't make sense to call something atomic just because the user wrote it.