The PyYAML package loads unmarked strings as either unicode or str objects, depending on their content.
Having a snippet like this: import yaml class User(object): def __init__(self, name, surname): self.name= name
This is how PyYAML behaves on my machine: >>> plan = {\'Business Plan\': [\'Collect Underpants\', \'?\', \'Profit\']}
I have >>> import yaml >>> yaml.dump(u\'abc\') \"!!python/unicode \'abc\'\\n\" But I want