From 84aa2e8627abcf3ca1dceb1d4ebfaaf16033b8e6 Mon Sep 17 00:00:00 2001 From: Joe Farebrother Date: Wed, 9 Apr 2025 14:07:38 +0100 Subject: [PATCH] Apply review suggestion - Tweak wording of example comment Co-authored-by: Taus --- python/ql/src/Variables/LoopVariableCapture/examples/good2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ql/src/Variables/LoopVariableCapture/examples/good2.py b/python/ql/src/Variables/LoopVariableCapture/examples/good2.py index 1a2469b4220..7047e11d0b6 100644 --- a/python/ql/src/Variables/LoopVariableCapture/examples/good2.py +++ b/python/ql/src/Variables/LoopVariableCapture/examples/good2.py @@ -1,5 +1,5 @@ import functools -# GOOD: A default parameter is used, so the variable `i` is not being captured. +# GOOD: `functools.partial` takes care of capturing the _value_ of `i`. tasks = [] for i in range(5): tasks.append(functools.partial(lambda i: print(i), i))