Если запустить 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
Apple Strudel
Ingredients for the dough:
🍚 250g all-purpose flour
💧 100 ml water
🥚 1 egg
🌿 20g vegetable oil
🧂 1 pinch of salt
For the filling:
🍏 4 Granny Smith apples, peeled and sliced
🍋 Lemon juice
🍇 100g dried cranberries
🍞 100g breadcrumbs
🧈 50g butter (melted, for brushing the dough and sautéing the breadcrumbs)
🌰 50g candied pecans, chopped
🍂 1 tsp cinnamon
🍬 70g sugar
🍨 1 scoop of ice cream
#sweet
@dishes
Pavlova
5 large egg whites 🥚 (at room temperature)
270g. Extra fine sugar or caster sugar 🍬
4g. Cream of tartar or 1 tsp white vinegar 🍶
1 Tbsp Cornstarch 🌽
For topping cream:
1 1/2 cup heavy whipped cream 🍦
50g. powdered sugar 🍚
1/2 tsp vanilla extract 🌸
For syrup:
1 1/2 cup Hibiscus flowers 🌺
2 cups sugar 🍬
Lemon zest 🍋
Fresh fruit or any berries for topping 🍓🍇
#sweet
@dishes
➡️New build available for Xiaomi Redmi Note 10 Pro / Pro Max (sweet)
👤 by Pulkit Agarwal
ℹ️ Version: 13
📆 Build date: November 23, 2023 04:24
📂 File size: 1.73 GB
⬇️ Download now
#sweet#pixelexperience