Detecting infinite recursion
问题 I'm creating a macro for Trac, and one of the things it does is to render a bit of wiki text, that can in turn use the same macro. This can give rise to an infinite recursion if the inner macro is invoked with the same arguments (i.e., renders the same bit of wiki text). I thought of trying to stop the user from shooting his own foot like this by inspecting the call stack and breaking the recursion if the function that expands the macro was already invoked with exactly the same set of