mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
revert r69777 since all the experts agree that extra import lines distract from the code
This commit is contained in:
parent
5149742e8b
commit
a7b55a33f8
31 changed files with 42 additions and 96 deletions
|
@ -481,9 +481,7 @@ Client-side operation
|
|||
This example connects to an SSL server, prints the server's address and certificate,
|
||||
sends some bytes, and reads part of the response::
|
||||
|
||||
import pprint
|
||||
import socket
|
||||
import ssl
|
||||
import socket, ssl, pprint
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
||||
|
@ -537,8 +535,7 @@ For server operation, typically you'd need to have a server certificate, and pri
|
|||
You'd open a socket, bind it to a port, call :meth:`listen` on it, then start waiting for clients
|
||||
to connect::
|
||||
|
||||
import socket
|
||||
import ssl
|
||||
import socket, ssl
|
||||
|
||||
bindsocket = socket.socket()
|
||||
bindsocket.bind(('myaddr.mydomain.com', 10023))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue