Building lambda computation in Python