[docs] Typo in 16.6.1.1.
Georg Brandl
georg at python.org
Mon Nov 1 13:29:01 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 30.10.2010 18:29, schrieb Sebastian Zug:
> Dear Python documentation team,
>
> on page
>
> http://docs.python.org/library/multiprocessing.html
>
> in chapter "16.6.1.1. The Process class" there is a obvious typo inside
> the second code example in line 7
>
> from multiprocessing import Process
> import os
>
> def info(title):
> print title
> print 'module name:', __name__
> print 'parent process:', os.getppid() <-- it means os.getpid()
I think this is correct -- getpid() is called in the next line.
os.getppid() does exist and returns the parent process ID.
> print 'process id:', os.getpid()
>
> def f(name):
> info('function f')
> print 'hello', name
>
> if __name__ == '__main__':
> info('main line')
> p = Process(target=f, args=('bob',))
> p.start()
> p.join()
>
> Best wishes from Germany
Best wishes back,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
iEYEARECAAYFAkzOso0ACgkQN9GcIYhpnLAMQwCgkoQEmAGGd7ff2veIg1oQzwlg
L4EAnAvxv1AXD6i1ghSuuKL5e7lu2ox0
=q5gc
-----END PGP SIGNATURE-----
More information about the docs
mailing list