Most voted "corotina" questions
3 questions
Sort by count of
-
26
votes1
answer2059
viewsWhat are the coroutines?
What I’ve been given to understand is that it’s a new way of writing asynchronous code, allowing you to avoid blocking the thread. This leads me to assume that they are an alternative to class…
-
3
votes1
answer183
viewsIs it possible to define async as the initializer method of a Python class?
Let’s say I have a class where I need to initialize a field with the return of a corotina: import asyncio class Server: def __init__(self): self.connection = await self.connect() async def…
-
0
votes0
answers57
viewsPython - about asyncio
I started testing pynput with asyncio, but there’s one problem I can’t solve at all. My code: current = set() def on_press(key): if key == keyboard.Key.up: current.add(key) print('Y') if key ==…