aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreterobjects.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-06-01 15:48:23 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-06-04 20:10:05 -0700
commitb107171307505e1493f76b53ace7db1ac070e819 (patch)
treedf6053ee1233a2439e21b4759dbbdf59d476921d /mesonbuild/interpreter/interpreterobjects.py
parent8890a624997a9cf56ead08bda03e9b46803986ad (diff)
downloadmeson-b107171307505e1493f76b53ace7db1ac070e819.zip
meson-b107171307505e1493f76b53ace7db1ac070e819.tar.gz
meson-b107171307505e1493f76b53ace7db1ac070e819.tar.bz2
interpreterbase: Allow safely using mutable default values with typed_kwargs
It's really inconvenient to want a thing that is always a list, but not be able to provide a default value of a list because of mutation. To that end the typed_kwargs method now makes a shallow copy of the default when using a `ContainerTypeInfo` as the type. This mean that using a default of `[]` is perfectly safe.
Diffstat (limited to 'mesonbuild/interpreter/interpreterobjects.py')
0 files changed, 0 insertions, 0 deletions