79594705

Date: 2025-04-27 05:45:45
Score: 2
Natty:
Report link

It is not cached as you assume. The statement you show that uses f() is a top-level statement and therefore it only runs once when the module is first imported. It doesn't matter how many times you expect a to equal 1, you're not re-executing any code whatsoever. The only time that the code in the ./asd module ran was when the module was first imported, when zero test cases had been executed.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Asmail