Skip to content

Commit 84aa2e8

Browse files
Apply review suggestion - Tweak wording of example comment
Co-authored-by: Taus <[email protected]>
1 parent e08072d commit 84aa2e8

File tree

1 file changed

+1
-1
lines changed
  • python/ql/src/Variables/LoopVariableCapture/examples

1 file changed

+1
-1
lines changed

Diff for: python/ql/src/Variables/LoopVariableCapture/examples/good2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import functools
2-
# GOOD: A default parameter is used, so the variable `i` is not being captured.
2+
# GOOD: `functools.partial` takes care of capturing the _value_ of `i`.
33
tasks = []
44
for i in range(5):
55
tasks.append(functools.partial(lambda i: print(i), i))

0 commit comments

Comments
 (0)