title: YAML - Dumping a nested object without types/tags
body: <p>I'm trying to dump some Python objects out into YAML.</p>
  
  <p>Currently, regardless of YAML library (<code>pyyaml</code>, <code>oyaml</code>, or <code>ruamel</code>) I'm having an issue where calling <code>.dump(MyObject)</code> gives me correct YAML, but seems to add a lot of metadata about the Python objects that I don't want, in a form that looks like:</p>
  
  <p><code>!!python/object:MyObject</code> and other similar strings.</p>
  
  <p>I do not need to be able to rebuild the objects from the YAML, so I am fine for this metadata to be removed completely</p>
  
  <p>Other questions on SO indicate that the common solution to this is to use <code>safe_dump</code> instead of <code>dump</code>. </p>
  
  <p>However, <code>safe_dump</code> does not seem to work for nested objects (or objects at all), as it throws this error:</p>
  
  <pre><code>yaml.representer.RepresenterError: ('cannot represent an object', MyObject)
  </code></pre>
  
  <p>I see that the common workaround here is to manually specify Representers for the objects that I am trying to dump. My issue here is that my Objects are generated code that I don't have control over. I will also be dumping a variety of different objects. </p>
  
  <p>Bottom line: Is there a way to dump nested objects using <code>.dump</code>, but where the metadata isn't added?</p>