[issue40850] Programming FAQ - variables local to the lambdas
New submission from Rainald Koch <Rainald.Koch@t-online.de>: In section [10] of the FAQ, I whould add "(a function parameter with different default values)" after "variables local to the lambdas". Besides, I had to look up "memoizing" [2] and suspect that "memorizing" would be correct. [10] https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-l... [2] https://en.wikipedia.org/wiki/Memoization ---------- assignee: docs@python components: Documentation messages: 370637 nosy: Rainald Koch, docs@python priority: normal severity: normal status: open title: Programming FAQ - variables local to the lambdas type: enhancement versions: Python 3.10 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40850> _______________________________________
SilentGhost <ghost.adh@runbox.com> added the comment: I don't think your suggestion improve readability there. I think explanation following the code example does a decent job without being overly verbose. Regarding, memoization, it is mentioned in [0], right after describing the technique. So, I'm not sure why you had to specifically look it up or why you still suspect that memorisation would be correct [0]: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared... ---------- nosy: +SilentGhost _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40850> _______________________________________
Change by Raymond Hettinger <raymond.hettinger@gmail.com>: ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue40850> _______________________________________
participants (3)
-
Rainald Koch
-
Raymond Hettinger
-
SilentGhost