title: When can a Python object be pickled
body: <p>I'm doing a fair amount of parallel processing in Python using the multiprocessing module.  I know certain objects CAN be pickle (thus passed as arguments in multi-p) and others can't.  E.g.</p>
  
  <pre><code>class abc():
      pass
  
  a=abc()
  pickle.dumps(a)
  'ccopy_reg\n_reconstructor\np1\n(c__main__\nabc\np2\nc__builtin__\nobject\np3\nNtRp4\n.'
  </code></pre>
  
  <p>But I have some larger classes in my code (a dozen methods, or so), and this happens:</p>
  
  <pre><code>a=myBigClass()
  pickle.dumps(a)
  Traceback (innermost last):
   File "&lt;stdin&gt;", line 1, in &lt;module&gt;
   File "/usr/apps/Python279/python-2.7.9-rhel5-x86_64/lib/python2.7/copy_reg.py", line 70, in _reduce_ex
  raise TypeError, "can't pickle %s objects" % base.__name__
  TypeError: can't pickle file objects
  </code></pre>
  
  <p>It's not a file object, but at other times, I'll get other messages that say basically:  "I can't pickle this".</p>
  
  <p>So what's the rule?  Number of bytes?  Depth of hierarchy?  Phase of the moon?</p>