We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeee419 commit e43f65cCopy full SHA for e43f65c
18b-async-await/charfinder/.gitignore
@@ -0,0 +1 @@
1
+charfinder_index.pickle
18b-async-await/charfinder/http_charfinder.py
@@ -45,12 +45,11 @@ def home(request): # <1>
45
46
47
# BEGIN HTTP_CHARFINDER_SETUP
48
-@asyncio.coroutine
49
-def init(loop, address, port): # <1>
+async def init(loop, address, port): # <1>
50
app = web.Application(loop=loop) # <2>
51
app.router.add_route('GET', '/', home) # <3>
52
handler = app.make_handler() # <4>
53
- server = yield from loop.create_server(handler,
+ server = await loop.create_server(handler,
54
address, port) # <5>
55
return server.sockets[0].getsockname() # <6>
56
0 commit comments