Если запустить 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
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin, and amoxicillin no longer treat diseases they cured previously.
Using antimicrobials "anyhow " is making the treatment of common infections more difficult.
Let us work together to save medicines.
#BeAntimicrobialsAware
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin,
Amoxycillin no longer treat diseases they cure previously.
Using antimicrobials "anyhow " is making the treatment of common infections more difficult.
#WorldAntimicrobialAwarenessWeek2022
#AntimicrobialResistance is when medicines like #antimalarials, tetracycline, septrin, and amoxicillin no longer treat diseases they cured previously.
Everyone everywhere, including users and non-users of #antimicrobials has a role to play to prevent #AMR.
#BeAntimicrobialsAware