What is the idiomatic Python equivalent of this C/C++ code?
void fun()
{
static int count = 0;
count++;
printf("count is %d\n", count);
}
specifically, how does one implement the static member at the function level, as opposed to the class level? And does placing the function into a class change anything?