title: Manually editing a dumped pickle file in python
body: <p>I have two classes<code>ClassA</code> and <code>ClassB</code> with the same content and structure but just with different names. I saved an object of <code>ClassA</code> using <code>pickle.dump</code> to a binary file. However, I want to now load it in a different program which only has access to <code>ClassB</code>. Loading this file using <code>pickle.load</code> fails now as it can't find the <code>ClassA</code> description and thus throws some error like <code>No module named ClassA exists</code>.</p>
  
  <p>To solve this, I manually investigated the saved binary file, and found the required class name <code>ClassA</code> coded in ASCII in the file. I guessed that it was looking for this exact class name, which resulted in the above error. Upon changing this name from <code>ClassA</code> to <code>ClassB</code> inside this binary file, the code seemed to be correctly loading the object, but now as <code>ClassB</code>. Which is what i wanted.</p>
  
  <p>However, since i manually edited this file, I was wondering if there would be any adverse effects down the line for doing this. Or is it, if it works it ain't stupid scenario.</p>
  
  <p>Thanks in advance.</p>