Если запустить 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
Matter exists in different states:
● Solid – fixed shape and volume, particles tightly packed.
● Liquid – fixed volume, no fixed shape, particles slide past each other.
● Gas – no fixed shape or volume, particles far apart.
● Plasma – like gas but particles are charged.
● Glass – between solid and liquid, amorphous.
● Superfluid – liquid with no resistance near absolute zero.
● Bose-Einstein Condensate – particles act as one quantum entity.
● Fermionic Condensate – similar to Bose-Einstein but formed by fermions.
● Dropleton – quantum liquid of electrons and holes.
● Degenerate Matter – exists under extreme pressure inside stars or planets.
Matter changes state when energy is added or removed.
[Source]
https://t.me/googlefactss
@googlefactss🔬🌡️#Science#Matter#Physics#Education