@meuon the absolute terror in my heart when this happens. It means my mental model is totally wrong about what the code is actually doing.

@Hotweatherisbad @meuon this is where I finally break and write unit tests...

It was to avoid these "what the..." moments that I started always using linting and type hinting on my Python code, and (quite commonly) writing tests (not that I do TDD, shudder).

#testingsoftware #heisenbug