On Sat, Dec 11, 2021 at 9:43 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2021-12-10 at 17:24:22 -0500, > "Eric V. Smith" <e...@trueblade.com> wrote: > > > [0]: Or arguments, I can never remember which is which: someone needs > > to invent a memorable mnemonic device. > > Pass Arguments > Accept Parameters > > (I don't know. I just made that up. For some reason, the fact that > functions have "formal parameters" stuck with me (to me?) from > somewhere, and then I can put the pieces together to figure out where > the arguments must come from. And you can't unsee it now; sorry.)
Formal parameters are the placeholders - the variable names that receive values. Arguments or "actual parameters" are what got used when the function got called. An optional parameter can have a default argument which is used when there is no argument passed. In some languages, a parameter can be optional without a default, in which case it won't have a value, but in current Python, defaults and optionality always go together. Whether 'self' counts as a parameter, and whether the object to the left of the dot counts as an argument, depends on your point of view. :) ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/77VNOGOZ43IN4WIUULX6FJMHFDL4CDQD/ Code of Conduct: http://python.org/psf/codeofconduct/