[issue40641] Reserved word pair used in lambda tutorial without being noted as a reserved word
Mark Dickinson
report at bugs.python.org
Sat May 16 04:00:01 EDT 2020
Mark Dickinson <dickinsm at gmail.com> added the comment:
`pair` isn't a reserved word here; it's just the formal parameter name. Think of the lambda here as being equivalent to a function
def second(pair):
return pair[1]
You can replace the word "pair" here with any other valid Python identifier, and it'll still work the same way.
----------
nosy: +mark.dickinson
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40641>
_______________________________________
More information about the Python-bugs-list
mailing list