]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix Issue7285 - multiprocessing module, example code error.
authorSenthil Kumaran <orsenthil@gmail.com>
Sun, 10 Oct 2010 06:13:49 +0000 (06:13 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Sun, 10 Oct 2010 06:13:49 +0000 (06:13 +0000)
Doc/library/multiprocessing.rst

index e7f9afec3b68e2676186c6a7a67702111f628195..f8327ec2d237828fc510a687578172b8219f32d1 100644 (file)
@@ -1807,14 +1807,14 @@ the client::
    from array import array
 
    address = ('localhost', 6000)     # family is deduced to be 'AF_INET'
-   listener = Listener(address, authkey='secret password')
+   listener = Listener(address, authkey=b'secret password')
 
    conn = listener.accept()
    print('connection accepted from', listener.last_accepted)
 
    conn.send([2.25, None, 'junk', float])
 
-   conn.send_bytes('hello')
+   conn.send_bytes(b'hello')
 
    conn.send_bytes(array('i', [42, 1729]))
 
@@ -1828,7 +1828,7 @@ server::
    from array import array
 
    address = ('localhost', 6000)
-   conn = Client(address, authkey='secret password')
+   conn = Client(address, authkey=b'secret password')
 
    print(conn.recv())                  # => [2.25, None, 'junk', float]