The YAML special token ‘!‘ can cause errors in PyYaml. To avoid these issues, it is recommended to convert the token to ‘!!str’ and revert the change when writing back. For more information, consult the full documentation available at pyyaml.org/wiki/PyYAMLDocumentation.

special token like !<str> need to be converted to !!str, while writing back we just do it in reverse.

full reference of pyyaml is here

Comments