0
[ANSWERED] Lambdas
What the advantage of creating lambda functions over conventional ones? (Just studying tutorial)
2 odpowiedzi
+ 5
They explain very well here.
http://www.bogotobogo.com/JUMP_LINK__&&__python__&&__JUMP_LINK/python_functions_lambda.php
+ 2
Let's use an analogy. Suppose you go through each line of code. You get a function statement. Now, here you can do 2 things. You can take the address where function is go and jump directly to end, execute it and finally using address come back to original location. but suppose if I give you a machine which contains how function behaves. So when you encounter a function call you can immediately execute the function without going anywhere then it would be too much fast. This is what lambdas does.However don't give too much code as it can cause memory cost!!!