]> granicus.if.org Git - python/commitdiff
Issue #26462: Merge code block fixes from 3.5
authorMartin Panter <vadmium+py@gmail.com>
Fri, 29 Jul 2016 01:49:37 +0000 (01:49 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Fri, 29 Jul 2016 01:49:37 +0000 (01:49 +0000)
1  2 
Doc/extending/embedding.rst
Doc/library/decimal.rst
Doc/library/socketserver.rst
Doc/library/subprocess.rst
Doc/library/sys.rst
Doc/library/sysconfig.rst
Doc/reference/lexical_analysis.rst
Doc/tutorial/controlflow.rst
Doc/tutorial/interpreter.rst
Doc/whatsnew/3.3.rst

Simple merge
Simple merge
index 3eb27e3a14a0bf2afff97ceae0e39f761e455fe1,087f4e0d4525059d8971008d55f44d89e3f11d8a..218a31c848aa1b1960e742b4c50ad08f06ec433d
@@@ -601,25 -585,27 +605,27 @@@ An example for the :class:`ThreadingMix
         HOST, PORT = "localhost", 0
  
         server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
 -       ip, port = server.server_address
 +       with server:
 +           ip, port = server.server_address
  
 -       # Start a thread with the server -- that thread will then start one
 -       # more thread for each request
 -       server_thread = threading.Thread(target=server.serve_forever)
 -       # Exit the server thread when the main thread terminates
 -       server_thread.daemon = True
 -       server_thread.start()
 -       print("Server loop running in thread:", server_thread.name)
 +           # Start a thread with the server -- that thread will then start one
 +           # more thread for each request
 +           server_thread = threading.Thread(target=server.serve_forever)
 +           # Exit the server thread when the main thread terminates
 +           server_thread.daemon = True
 +           server_thread.start()
 +           print("Server loop running in thread:", server_thread.name)
  
 -       client(ip, port, "Hello World 1")
 -       client(ip, port, "Hello World 2")
 -       client(ip, port, "Hello World 3")
 +           client(ip, port, "Hello World 1")
 +           client(ip, port, "Hello World 2")
 +           client(ip, port, "Hello World 3")
  
 -       server.shutdown()
 -       server.server_close()
 +           server.shutdown()
  
  
- The output of the example should look something like this::
+ The output of the example should look something like this:
+ .. code-block:: shell-session
  
     $ python ThreadedTCPServer.py
     Server loop running in thread: Thread-1
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c89fae36cb76f2044dc96fe69e752d6be00f5603,e8d8e2b56aaf055c08f69e93f2baa85fe9c5da70..faf57a344c025bb33ecaac4a77dd4e56165ea919
@@@ -94,10 -94,12 +94,12 @@@ mode*.  In this mode it prompts for th
  usually three greater-than signs (``>>>``); for continuation lines it prompts
  with the *secondary prompt*, by default three dots (``...``). The interpreter
  prints a welcome message stating its version number and a copyright notice
- before printing the first prompt::
+ before printing the first prompt:
+ .. code-block:: shell-session
  
 -   $ python3.5
 -   Python 3.5 (default, Sep 16 2015, 09:25:04)
 +   $ python3.6
 +   Python 3.6 (default, Sep 16 2015, 09:25:04)
     [GCC 4.8.2] on linux
     Type "help", "copyright", "credits" or "license" for more information.
     >>>
Simple merge