Issue #21 new
Python implementation of safe_dump converts string of an int into an int
So a string containing something which looks like an integer will be dumped in to yaml which is an integer. Hence round tripping is not true. yaml.dump seems to work correctly by preserving the escaping quotes:
assert yaml.safe_load(yaml.safe_dump('2')) == 2 assert yaml.load(yaml.dump('2')) == '2'