Если запустить 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
She's a mother, a daughter,
She's brave, courageous,
Is She's feeble ? Helpless ?
No! It's you, your frame of mind,
Still let's her freedom to rescind!
She's not disabled,
Just the scenario made her existence confined,
Even in the century of 21st,
She's still defenseless over the set of your mind!
She never got the freedom, which a boy gets at his age,
So could you please let me know,
How She's guilty at every stage ?
Either She's LAXMI to NIRBHAYA and PRIYANAKA in 2019,
Nothing has changed,
Every single day, every single minute, nd in every single second,
She's molested, burnt and raped!
This act is plaintive enough,
We can't even think of,
Only a question I wanted to ask,
When she'll get rid of!
💯
-Gurpreet Bhatia
#guri#poetry#review#write