Pure Starlark doesn't have setattr() because no builtin types have mutable fields. Even Bazel's struct() type doesn't have mutable fields.
In principle we could add setattr() in order to standardize its behavior for applications that do have mutable fields. Undecided on whether that's worth doing.
Pure Starlark doesn't have
setattr()because no builtin types have mutable fields. Even Bazel'sstruct()type doesn't have mutable fields.In principle we could add
setattr()in order to standardize its behavior for applications that do have mutable fields. Undecided on whether that's worth doing.