[DeferredDict] capture value in set_const

This commit is contained in:
jan 2026-03-09 01:10:26 -07:00
commit 0ad89d6d95

View file

@ -60,4 +60,4 @@ class DeferredDict(dict, Generic[Key, Value]):
Convenience function to avoid having to manually wrap Convenience function to avoid having to manually wrap
constant values into callables. constant values into callables.
""" """
self[key] = lambda: value self[key] = lambda v=value: v