Если запустить 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
США покупают у мира больше товаров, чем продают. Это создает торговый дефицит. Трамп давит на "партнеров", чтобы решить эту проблему. В том числе на Японию.
Авторынок Японии на 95% заполнен национальным автопромом. Иностранцу попасть трудно. В 25-м Трамп угрожал тарифами и Япония открылась для американских авто.
В этом году начнется экспорт американских Acura Integra Type S. 2-х литровый турбо мотор на 320 лс, передний привод и механика. Левый руль.
Японцы такое не купят - 👎
Купят - 👍
#acura
#python#acura#audi#autopilot#chrysler#comma#fsd#genesis#honda#hyundai#jeep#kia#lexus#mazda#nissan#openpilot#ram#selfdriving#tesla#toyota#volkswagen
sunnypilot is a free, open-source driver assistance system that works with over 300 car models, offering features like independent lane centering and adaptive cruise control for a safer, more customizable driving experience. It requires a compatible device (like comma three) and a supported car with adaptive cruise control, providing smoother steering, automatic speed adjustments, and easy updates through user-friendly installation options. Users benefit from enhanced safety, personalized driving settings, and access to a community for support and updates.
https://github.com/sunnypilot/sunnypilot