Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
The Toronto HongKonger Dragon Boat team is now recruiting.
About the team:
We stand with HongKongers. Our goal is to regain HongKongers’ energy in Toronto and maintain our Lion Rock spirits high and strong in Canada through dragon boat racing, spreading the name of 'HongKongers' to more people.
coach – Matthew Ma:
👉🏻10 years of experience
👉🏻8 years as a certified dragon boat coach.
👉🏻was a part of the national team that represented Canada in the 13th and 14th World Dragon Boat Racing Championships in China and Thailand.
Facebook: https://www.facebook.com/profile.php?id=61554437804498&mibextid=LQQJ4d
Instagram: https://www.instagram.com/tohkdbt?igsh=MXF1NXRhMWdxYjEwcQ==
Email: [email protected]
Application: form at https://forms.gle/7HS5Uao5xFQd9isUA
#hongkonger#toronto#torontohongkonger
#drangonboatteam
#dragonboatrecruitment