Если запустить 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
🚗✨ Exciting news from BMW! The new extended X3 is here, specially designed for the Chinese market! 🇨🇳
With a wheelbase stretched by 110 mm to an impressive 2975 mm (just like the European BMW X5), the overall length now reaches 4865 mm! 📏
Available in two versions: 25L and 30L, both equipped with an 8-speed automatic transmission and a powerful 2.0L turbo engine. Choose between 190 hp & 310 Nm or 258 hp & 400 Nm! 💪🔥
#BMW#X3#LuxurySUV#China#CarNews#Automotive#Innovation#Auto🚘🌟
🚗✨ Exciting news for Land Rover fans! The upcoming Discovery is set to embrace a more family-friendly design, possibly resembling a minivan! 🏡👨👩👧👦
As stated by Mark Cameron, this shift is aimed at boosting sales, especially with the Defender selling six times better in 2023. 📈💼
Stay tuned for the new generation expected in 2026! 🗓️🔄
#LandRover#Discovery#FamilyCar#MinivanStyle#CarNews#2026Release#Sports🌍🚙