Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite43f65c

Browse files
committed
http_charfinder.py with async/await
1 parentaeee419 commite43f65c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎18b-async-await/charfinder/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
charfinder_index.pickle

‎18b-async-await/charfinder/http_charfinder.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ def home(request): # <1>
4545

4646

4747
# BEGIN HTTP_CHARFINDER_SETUP
48-
@asyncio.coroutine
49-
definit(loop,address,port):# <1>
48+
asyncdefinit(loop,address,port):# <1>
5049
app=web.Application(loop=loop)# <2>
5150
app.router.add_route('GET','/',home)# <3>
5251
handler=app.make_handler()# <4>
53-
server=yieldfromloop.create_server(handler,
52+
server=awaitloop.create_server(handler,
5453
address,port)# <5>
5554
returnserver.sockets[0].getsockname()# <6>
5655

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp