Can a Python method check if it has been called from within itself?,foo()