title: Generate primer with multiprocessing.pool.map, it outputs redundant info
body: <p>I want to find all primer in [0,M), and write it with multiprocessing.pool.map method, but it output so many None that I don't want. My code like this:</p>
  
  <pre><code>from multiprocessing import Pool
  
  M = 100
  vi = [0] * M
  
  def do_sieve(p):
      global vi
      if p &lt;= 1:
          vi[p] = -1
          return 
      for i in range(2*p, M, p):
          vi[i] = 1
      if vi[p] == 0:
          return p
  
  if __name__ == '__main__':
      pool_size = 4
      pool = Pool(processes = pool_size)
      result = pool.map(do_sieve, range(0, M), 50)
      print result
  </code></pre>
  
  <p>it output like this:</p>
  
  <p>[None, None, 2, 3, None, 5, None, 7, None, None, ......]</p>
  
  <p>I know that's because <strong>do_sieve</strong> will return directly with nothing if p is not primer, so I want <strong>result</strong> just contain all primer. Can anyone help me improve it?</p>