mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
gh-108903: Remove unneeded lambda
s from asyncio
(GH-108904)
This commit is contained in:
parent
1e0d62793a
commit
ad1d6a1c20
2 changed files with 5 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue