Если запустить 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
Direct from UK manufacturer
Heavyweight rubber back VetBed
Buy now before the Winter ⛄️
Warm , Machine Washable 50 colour choices
Buy full roll for maximum discount
Free home delivery ;
Estonia 🇪🇪 Finland 🇫🇮 Latvia 🇱🇻
Lithuania 🇱🇹 Poland 🇵🇱 Slovakia 🇸🇰
Czech Republic 🇨🇿 Hungary 🇭🇺
Croatia 🇭🇷
Payment by bank crypto or to the delivery 📦 driver 🚚
www.Kennel.Ai
#VetBed#Kennel.Ai #DogBreeder#PetDogNFT
Direct from UK manufacturer
Heavyweight rubber back VetBed
Buy now before the Winter ⛄️
Warm , Machine Washable 50 colour choices
Buy full roll for maximum discount
Free home delivery ;
Estonia 🇪🇪 Finland 🇫🇮 Latvia 🇱🇻
Lithuania 🇱🇹 Poland 🇵🇱 Slovakia 🇸🇰
Czech Republic 🇨🇿 Hungary 🇭🇺
Croatia 🇭🇷
Payment by bank crypto or to the delivery 📦 driver 🚚
www.Kennel.Ai
#VetBed#Kennel.Ai #DogBreeder#PetDogNFT
Direct from UK manufacturer
Heavyweight rubber back VetBed
Buy now before the Winter ⛄️
Warm , Machine Washable 50 colour choices
Buy full roll for maximum discount
Free home delivery ;
Estonia 🇪🇪 Finland 🇫🇮 Latvia 🇱🇻
Lithuania 🇱🇹 Poland 🇵🇱 Slovakia 🇸🇰
Czech Republic 🇨🇿 Hungary 🇭🇺
Croatia 🇭🇷
Payment by bank crypto or to the delivery 📦 driver 🚚
www.Kennel.Ai
#VetBed#Kennel.Ai #DogBreeder#PetDogNFT