Если запустить 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
Qalblar yanada taskin topdi, ahir oshiqlar o'lmas!
Fotih Dumanning kitoblari yaxshi chiqdi, "Sir" kitobini 2 kunda o'qib tugatdim, bundan avval "Men" kitobini mutolaa qilgan edik.
🤫 Ushbu kitobga o'lim haqida Sir berkitilgan ekan, men uni anglab yetdim, Sizga ham o'qishni tavsiya etaman, zero, ancha sirlardan xabar topasiz.
#Sir
@isakovxusniddin
#SIR#Facts@ssbclear
🗳Massive Drop in 'Zero Ineligible Voter' Polling Stations in Bengal
- The number of polling stations in West Bengal with zero ineligible voters plummeted from 2,208 to just 7 after Election Commission scrutiny.
- Districts like South 24 Parganas, Purulia, and Malda, which previously had hundreds of such booths, now report only one or two each.
- Over 50 lakh electors have been flagged as dead, duplicate, shifted, or untraceable.
- Around 98.84% of enumeration forms have been digitised from 7.6 crore registered voters.
- A new software, Demographic Similar Entries, helped detect 1.22 lakh ineligible names so far.
- Legal action is promised against Booth Level Officers if deliberate errors are found.
- These reforms come ahead of West Bengal’s upcoming elections next year.