Paste that into a Python 3 interpreter, you should see "55". Somewhere in there is the Y-contaminator and several other tricks similar to what this article describes.
If you like that sort of thing, try doing similar code for the Ackermann function [1]. In a certain sense that can be made semi-formal, if you can do this sort of thing for the Ackermann function, then you can do it for almost anything.
If you want your mind to blow up I recommend watching this year's "Lambda Calculus from the Ground Up" PyCon talk by the wizard David Beazley https://www.youtube.com/watch?v=pkCLMl0e_0k
reply