title: How to deserialize an object with PyYAML using safe_load?
body: <p>Having a snippet like this: </p>
  
  <pre><code>import yaml
  class User(object):
      def __init__(self, name, surname):
         self.name= name
         self.surname= surname
  
  user = User('spam', 'eggs')
  serialized_user = yaml.dump(user)
  #Network
  deserialized_user = yaml.load(serialized_user)
  print "name: %s, sname: %s" % (deserialized_user.name, deserialized_user.surname)
  </code></pre>
  
  <p><a href="http://pyyaml.org/wiki/PyYAMLDocumentation" rel="noreferrer">Yaml docs</a> says that it is not safe to call <strong>yaml.load</strong> with any data received from an untrusted source; so, what should I modify to my snippet\class to use <strong>safe_load</strong> method?<br>
  Is it possible?</p>