Если запустить 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
🇮🇳 Au moins une personne est morte et treize autres ont été blessées dans l'effondrement d'une attraction foraine à Faridabad, dans l'État d'Haryana, dans le nord de l'Inde. C'est ce qu'a rapporté l'agence ANI, citant le commissaire de district de Faridabad.
Selon le commissaire, vers 18h15 (UTC+6), une attraction s'est effondrée lors de la foire Surajkund, tuant un inspecteur de police qui tentait de sauver d'autres personnes. Treize autres personnes ont été blessées et hospitalisées, a indiqué l'agence.
#inde#attraction#effondrement#victimes
Why are some voices so attractive? 🎤
It is about what they signal.
Women often find deep male voices appealing because they suggest a larger body size. But a touch of breathiness is key, it softens the voice, making it seem less aggressive and more attractive.
Meanwhile, men tend to prefer higher-pitched female voices, which can signal a smaller frame.
It’s all subconscious — our ears are sizing people up.👂💘
[Read more]
@googlefactss#Voice#Attraction#Psychology#Dating#Science
🎙️Science Fact: Women's voices sound more attractive when recorded during their most fertile time of the month. 🎶
Studies show listeners rate these voices higher and even experience a slight testosterone boost.
[Read more]
@googlefactss
#VoiceScience#Fertility#Attraction#FunFact#Biology