Если запустить 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 overall goal of Infection Prevention & Control is to maintain an environment of care that minimises risks of infection for patients, staff & visitors.
These #IPC guidelines must be practised by all #HCWs in public and private primary, secondary & tertiary healthcare facilities.
Read more in the Nigerian Manual of Infection Prevention and Control:
https://ncdc.gov.ng/themes/common/docs/protocols/296_1649340294.pdf
The overall goal of Infection Prevention & Control is to maintain an environment of care that minimises risks of infection for patients, staff & visitors.
These #IPC guidelines must be practised by all #HCWs in public and private primary, secondary & tertiary healthcare facilities.
Read more in the Nigerian Manual of Infection Prevention and Control:
https://ncdc.gov.ng/themes/common/docs/protocols/296_1649340294.pdf
The overall goal of Infection Prevention & Control is to maintain an environment of care that minimises risks of infection for patients, staff & visitors
This #IPC guideline for viral haemorrhagic fevers must be practised by all #HCWs in public & private primary, secondary & tertiary healthcare facilities.
🔗
https://ncdc.gov.ng/themes/common/docs/protocols/341_1707300274.pdf
#TakeResponsibility to #StaySafe