Re:WTFPython: Exploring and understanding Python through sur...
by cecilpl2 on Tuesday May 31, 2022 @02:32PM
(#31573085)
> My intuitions come from C and C++, so "+=" should always modify a single object (in C lingo it would be "lvalue") in place. Storing the result somewhere else than the left side of "+=" is counterintuitive to me.
I thought of this as though the list A.b was marked static - then any modification of b through any instance of A modifies the shared static member
I thought of this as though the list A.b was marked static - then any modification of b through any instance of A modifies the shared static member