Если запустить 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
A car stops in front of the palace at night in a terrifying scene.in the year 2019 in Egypt, above shot, artist by Richard Tuschman Style --ar 16:9 --v 6.1
by mtcreation19
#vehicle
🐝 Prompt collection
#AutoLog#UK#Vehicle#Manager
Join the AutoLog - UK Vehicle Manager beta on ✈️#TestFlight
🔗 Link: https://testflight.apple.com/join/yPmgXjnF
Shared by Dimitri
These Stupid Trucks are Literally Killing Us | Not Just Bikes
One of these vehicles are designed to efficiently carry lots of useful stuff, while the other is designed to carry fragile egos.
———
好強的攻擊性
#Video#Transport#Vehicle#SUV#Urbanist#NJB
https://www.youtube.com/watch?v=jN7mSXMruEo