title: How to use dill to serialize a class definition?
body: <p>In the answer to <a href="https://stackoverflow.com/questions/16269071/python-pickle-dealing-with-updated-class-definitions">Python pickle: dealing with updated class definitions</a>, the author of the <code>dill</code> package writes:</p>
  
  <p><em>"Ok, I have added this feature to dill in the latest revision on github. Implemented with far less trickery than I thought... just serialize the class definition with the pickle, and voila."</em></p>
  
  <p>Having installed <code>dill</code> and tinkered with it, it's not obvious to me how to actually use this functionality in <code>dill</code>.  Could someone provide an explicit example?  I would like to pickle the class instance and also serialize the class definition.</p>
  
  <p>(I am new to python and I this functionality seems extremely important, as since when pickling an object it would be great to get as close to a guarantee as possible that you could look at the object (could be the result of a simulation) in the future after the class definition may have changed and you haven't kept track of all the changes in an easily accessible way.)</p>