Если запустить 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
🌎 On Ellesmere Island in Canada’s High Arctic, Alert is Earth’s northernmost permanently inhabited settlement. In winter, temperatures can plunge to –40°C, and the sun disappears for months. Fewer than 100 people live here year-round. ✨
#arctic⚡#climate⚡#isolation
👉subscribe Interesting Planet
👉more Channels
🌎 One of the world's most remote settlements is Tristan da Cunha, an island in the South Atlantic Ocean. Home to only about 250 people, it lies 2,400 kilometers from the nearest continent. The island has no airport and is accessible only by a week-long boat journey from South Africa. ✨
#geography⚡#settlements⚡#isolation
👉subscribe Interesting Planet
👉more Channels
La canzone "C'è solo la strada" di Giorgio Gaber invecchia terribilmente bene e dopo il 2020 acquista quasi natura profetica.
#vaporonda#vaporwave#vapourwave#vaporart#seapunk#webpunk#glitch#glitchart#glitchartistscollective#chillwave#aesthetic#vaporwaveaesthetic#vaporwaveaesthetics#malinconia#melancholy#tristezza#sadness#sadboy#lofi#solitudine#loneliness#isolamento#isolation#casa#home#giorgiogaber