summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-protocol.rst
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2023-09-05 15:11:12 (GMT)
committerGitHub <noreply@github.com>2023-09-05 15:11:12 (GMT)
commitad1d6a1c20c7bd3e880c9af7251e6f39ff0e62a9 (patch)
treeb09beecd48431ffaf9af7d4b0e533e644173e1d8 /Doc/library/asyncio-protocol.rst
parent1e0d62793a84001e92f1c80b511d3a212b435acc (diff)
downloadcpython-ad1d6a1c20c7bd3e880c9af7251e6f39ff0e62a9.zip
cpython-ad1d6a1c20c7bd3e880c9af7251e6f39ff0e62a9.tar.gz
cpython-ad1d6a1c20c7bd3e880c9af7251e6f39ff0e62a9.tar.bz2
gh-108903: Remove unneeded `lambda`s from `asyncio` (GH-108904)
Diffstat (limited to 'Doc/library/asyncio-protocol.rst')
-rw-r--r--Doc/library/asyncio-protocol.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index 7bc906e..9781bda 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -746,7 +746,7 @@ received data, and close the connection::
loop = asyncio.get_running_loop()
server = await loop.create_server(
- lambda: EchoServerProtocol(),
+ EchoServerProtocol,
'127.0.0.1', 8888)
async with server:
@@ -850,7 +850,7 @@ method, sends back received data::
# One protocol instance will be created to serve all
# client requests.
transport, protocol = await loop.create_datagram_endpoint(
- lambda: EchoServerProtocol(),
+ EchoServerProtocol,
local_addr=('127.0.0.1', 9999))
try: