title: Python Multiprocessing Lib Error (AttributeError: __exit__)
body: <p>Am getting this error when using the <code>pool.map(funct, iterable)</code>:</p>
  
  <pre><code>AttributeError: __exit__
  </code></pre>
  
  <p>No Explanation, only stack trace to the pool.py file within the module.</p>
  
  <p>using in this way:</p>
  
  <pre><code>with Pool(processes=2) as pool:
     pool.map(myFunction, mylist)
     pool.map(myfunction2, mylist2)
  </code></pre>
  
  <p>I suspect there could be a problem with the picklability (python needs to <code>pickle</code>, or transform list data into byte stream) yet I'm not sure if this is true or if it is how to debug.</p>
  
  <p>EDIT: new format of code that produces this error :</p>
  
  <pre><code>def governingFunct(list):
      #some tasks
      def myFunction():
           # function contents
      with closing(Pool(processes=2)) as pool:
           pool.map(myFunction, sublist)
           pool.map(myFunction2, sublist2)
  </code></pre>
  
  <p>ERROR PRODUCED:</p>
  
  <pre><code>PicklingError: Can't pickle &lt;type 'function'&gt;: attribute lookup __builtin__.function failed
  </code></pre>