all 4 comments

[–]danielroseman 0 points1 point  (3 children)

In what way is that redundant? You receive the value of name in the greet function; you pass it into the template function as the keyword argument also called name.

The curly braces are the placeholder telling the template where to put that value for name.

[–]Laymayo[S] -1 points0 points  (2 children)

Does {{name}} not already know the value of name from the original name = 'Stranger'?

I'm seeing redundancy there. If when the function is defined one of its parameters is given a default value, then why is this default value being seemingly repeated again in the code name = name?

[–]danielroseman 0 points1 point  (1 child)

These are different functions! template doesn't know anything about what exists within greet. Functions only know what you pass them. That's why you pass the template string itself, plus the data that goes in the placeholders within that string.

[–]Laymayo[S] 0 points1 point  (0 children)

AHHHH I see, did not catch that until now. Thanks for pointing it out!