Если запустить 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
🔋🇺🇸EV REVOLUTION IN REVERSE — NEW ELECTRIC CAR SALES CRASH 27% AS TAX CREDITS VANISH
🔹 Q1 sales plummet to just 216k units as post-credit shock decimates demand — market share nosedives from 10.5% to 4.8% 📉
🔹 Ford EV deliveries obliterated by 70% while Honda collapses 81% — automakers bleeding red ink on every unit sold 🏭
🔹 Used electric cars hit record 43k monthly sales as buyers refuse to pay full sticker on brand new models 🚗
🔹 Nissan cancels US factory plans entirely while battery makers scramble for shrinking order books worldwide 🔧
Americans love the idea of EVs — they just refuse to pay premium prices without Uncle Sam's help 💀🔥
#EVCrisis#AutoNews
@america
🚗✨Lexus Unveils Upgraded LC Coupe and Convertible!✨🚗
Since its debut in 2017, the Lexus LC family has received a sleek exterior makeover and new interior materials. But that's not all! The updated models now feature a stiffer chassis, thanks to additional braces installed under the floor near the front and rear axles, enhancing overall handling. 🏎️💨
Under the hood, the Lexus LC offers a powerful lineup: a 5.0L V8 engine producing 477 hp or a hybrid V6 powertrain with a 3.5L engine delivering 359 hp. 🔥🔋
#LexusLC#LuxuryCars#CarEnthusiast#DrivingExperience#AutoNews#V8Power#Auto
🚙✨ Exciting News! The new Mitsubishi Pajero Sport has hit the testing grounds! 🛤️🔍
Despite its camouflage, it's clear that the front design draws inspiration from the current L200/Triton pickup. 🛻💨 The new front end beautifully complements the familiar rear styling.
Could this be a prototype testing individual components in a non-production body? 🤔🔧
While the release date remains a mystery, the current model is set to be discontinued in 2025. ⏳📅
#MitsubishiPajeroSport#CarTesting#NewRelease#Mitsubishi#SUV#AutoNews#Innovation#Auto