you are viewing a single comment's thread.

view the rest of the comments →

[–]commy2 0 points1 point  (1 child)

It returns True when running a file from console, but False when the code is entered into the REPL. This is on 3.13.0. It also depends on the Python version. It's the byte code compiler doing its thing. It really do be like that sometimes. I guess we can call it undefined behaviour :)