[DeferredDict] capture value in set_const
This commit is contained in:
parent
6c96968341
commit
0ad89d6d95
1 changed files with 1 additions and 1 deletions
|
|
@ -60,4 +60,4 @@ class DeferredDict(dict, Generic[Key, Value]):
|
|||
Convenience function to avoid having to manually wrap
|
||||
constant values into callables.
|
||||
"""
|
||||
self[key] = lambda: value
|
||||
self[key] = lambda v=value: v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue