Если запустить 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
Switch operatori
Tanlash operatori bizga bir nechta qiymatlardan, o’zgaruvchilarga to’g’ri keluvchi qiymatni tanlashda va uni ishga tushirishda ishlatiladi. Misol uchun, hafta kunlarini raqamidan topish topshiriq sifatida berildi. Ularni bemalol topishimiz mumkin, lekin kompyuterga uni qanday tushuntiramiz?
👉Batafsil
👨🏫 Mentor: Suxrob Xayitmurodov
#csharp#switch#choice#starter
.NET Uzbekistan Community
__________
Telegram | Instagram | Youtube
@QuanBot
Qué puede hacer este bot?
Este es un bot avanzado para crear encuestas, agregar opciones y usar muchas herramientas.
Idioma: Múltiple
(visto en @BotsGram_cu)
#group, #questions, #template, #poll, #publish, #choice, #inline, #community, #management, #administration, #voting, #vote, #votes, #survey
@ultimate_pollbot
Qué puede hacer este bot?
Este bot es un robot de votación y encuestas definitivo para crear, compartir y evaluar encuestas dentro de Telegram 🔎
Idioma: Inglés
(visto en @BotsGram.cu)
#choice, #forum, #comment, #inline, #community, #management, #administration, #groups, #vote, #votes, #poll, #decide, #decision, #question, #survey