Если запустить 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
Become a United Nations 🇺🇳 Volunteer (UNV is Recruiting)
Apply: https://opportunitiescorners.com/un-volunteer-program/
UNV is recruiting Volunteers from around the World.
The UN Covers Allowance, Accommodation, Meals, Insurance, Travel Expenses, Visa Cost.
#UNV#OpportunitiesCorners
United Nations 🇺🇳 International Volunteer Program 2026
Apply: https://opportunitiescorners.com/united-nations-volunteer-program-2026/
The International Volunteer Program is open to applicants from any country.
Volunteers will receive Living Allowance to cover all the expenses.
#OpportunitiesCorners#Volunteer#UNV