diff --git a/docs/source/structured_config.rst b/docs/source/structured_config.rst index 6d66aacb5..e5275e795 100644 --- a/docs/source/structured_config.rst +++ b/docs/source/structured_config.rst @@ -333,7 +333,7 @@ To work around it, use SI and II described below. >>> assert conf.c == 100 -Type validation (and implicit conversion when possible) is performed both on assignment and on values returned by interpolations, e.g: +Interpolated values are validated, and converted when possible, to the annotated type when the interpolation is accessed, e.g: .. doctest:: @@ -350,9 +350,8 @@ Type validation (and implicit conversion when possible) is performed both on ass omegaconf.errors.ValidationError: Value 'string' could not be converted to Integer full_key: int_key object_type=Interpolation - >>> cfg.str_key = 1234 # convert int to str (assignment) - >>> assert cfg.str_key == "1234" - >>> assert cfg.int_key == 1234 # convert str to int (interpolation) + >>> cfg.str_key = "1234" # string value + >>> assert cfg.int_key == 1234 # automatically convert str to int Frozen