Если запустить 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
Keeping #OurHawkerCentres clean and safe is a shared responsibility!
When we #ClearOurTables, #ReturnOurTrays and #BinUsedTissues after our meals, it scores a hat-trick of kindness, making it a more pleasant dining experience for everyone!
#DidYouKnow that East Coast Lagoon Food Village was built on reclaimed land? Opened in 1978, it complements the beach-front activities of Singapore’s largest seaside resort.
After enjoying the delicious hawker food while enjoying the sea breeze, let’s remember to return our used trays and crockery. We all have a part to play in ensuring a clean and safe dining experience at #OurHawkerCentres. #ClearOurTables#ReturnOurTrays#BinUsedTissues
P.S. You don’t have to wipe the tables, as cleaners will do so. More information and #FAQs here: www.nea.gov.sg/clean-tables