👋 Hey there, I am Waylon Walker
I am a Husband, Father of two beautiful children, Senior Python Developer currently working in the Data Engineering platform space. I am a continuous learner, and sha
An extension of functions are lambda functions. They are one liners that make it easy to embed them inline with other functions.
mult=lambdax,y:x*ymult(2,2)
Generally its not best practice to name a lambda like this though, and linters will yell and tell you to just make a regular function. Their power is embedding in other objects easily.
node(lambdax:x*2,'input_dataset','input_mult_2')
Here is a simple example of something I do often to create kedro nodes. I make simple functions right inline of creating the DAG node.
Keep up the work Chris.
An extension of functions are lambda functions. They are one liners that make it easy to embed them inline with other functions.
Generally its not best practice to name a lambda like this though, and linters will yell and tell you to just make a regular function. Their power is embedding in other objects easily.
Yeah had Lambda on my sheet, so they are basically your shorthand arrow function compared to JavaScript?
Or why are they introduced?
I must say I find the full write-out more readable at the moment, but might come in handy for sure!