Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



#python #sicp
This principle -- that the meaning of a function should be independent of the parameter names chosen by its author -- has important consequences for programming languages. The simplest consequence is that the parameter names of a function must remain local to the body of the function.
If you want to change selection, open document below and click on "Move attachment"

1.3 Defining New Functions
mplementer's choice of names for the function's formal parameters. Thus, the following functions should provide the same behavior: >>> def square(x): return mul(x, x) >>> def square(y): return mul(y, y) <span>This principle -- that the meaning of a function should be independent of the parameter names chosen by its author -- has important consequences for programming languages. The simplest consequence is that the parameter names of a function must remain local to the body of the function. If the parameters were not local to the bodies of their respective functions, then the parameter x in square could be confused with the parameter x in sum_squares . Critically,


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.