mirror of
https://github.com/github/codeql.git
synced 2026-04-02 05:38:21 +02:00
Apply review suggestion - Tweak wording of example comment
Co-authored-by: Taus <tausbn@github.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user