Pointers? In My Python? It's More Likely Than You Think!
summary
Explains where Python uses pointer-like references: variable names and container slots point to objects, so assignment creates aliasing unless using list.copy() or copy.deepcopy(); demonstrates shallow vs deep copy with lists-of-lists. Shows id() / is vs == differences and uses gc.collect() to find a cyclic isolate that clears four objects. Builds a cyclic pair with __del__ finalizers and a “bad” __del__ that resurrects an object via globals(), which prevents collection until that extra reference is removed.
AI-written summary · about
