[issue4012] Minor errors in multiprocessing docs

Georg Brandl report at bugs.python.org
Thu Oct 2 19:10:09 CEST 2008


Georg Brandl <georg at python.org> added the comment:

I e.g. tried a minimal example with Pool.map():

>>> from multiprocessing import Pool
>>> p = Pool(5)
>>> def f(x):
...  return x*x
...
>>> p.map(f, [1,2,3])
Process PoolWorker-1:
Traceback (most recent call last):
  File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line
231, in _bootstrap
    self.run()
  File "/home/gbr/devel/python/Lib/multiprocessing/process.py", line 88,
in run
    self._target(*self._args, **self._kwargs)
  File "/home/gbr/devel/python/Lib/multiprocessing/pool.py", line 57, in
worker
Process PoolWorker-2:

[some more exceptions]

    task = get()
  File "/home/gbr/devel/python/Lib/multiprocessing/queues.py", line 339,
in get
    return recv()
AttributeError: 'module' object has no attribute 'f'

And then the prompt doesn't reappear.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4012>
_______________________________________


More information about the Python-bugs-list mailing list