Zen of Python
Полный Дзен Пайтона в одном канале Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels Сайт: https://tprg.ru/site Регистрация в перечне РКН: https://tprg.ru/xZOL
Show more📈 Analytical overview of Telegram channel Zen of Python
Channel Zen of Python (@zen_of_python) in the Russian language segment is an active participant. Currently, the community unites 19 287 subscribers, ranking 6 972 in the Technologies & Applications category and 35 079 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 19 287 subscribers.
According to the latest data from 05 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by 26 over the last 30 days and by -3 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 12.34%. Within the first 24 hours after publication, content typically collects 5.62% reactions from the total number of subscribers.
- Post reach: On average, each post receives 2 378 views. Within the first day, a publication typically gains 1 082 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 9.
- Thematic interests: Content is focused on key topics such as github, rust, pip, api, install.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Полный Дзен Пайтона в одном канале
Разместить рекламу: @tproger_sales_bot
Правила общения: https://tprg.ru/rules
Другие каналы: @tproger_channels
Сайт: https://tprg.ru/site
Регистрация в перечне РКН: https://tprg.ru/xZOL”
Thanks to the high frequency of updates (latest data received on 07 June, 2026), the channel maintains relevance and a high level of publication reach. Analytics show that the audience actively interacts with content, making it an important point of influence in the Technologies & Applications category.
ExceptionGroup(
[ValueError("Ошибка 1"), TypeError("Ошибка 2")]
)
Рассмотрим пример:
import asyncio
async def task1():
raise ValueError("Ошибка в task1")
async def task2():
raise TypeError("Ошибка в task2")
async def main():
try: # ловит ExceptionGroup
await asyncio.gather(task1(), task2()) # запускает обе задачи параллельно
except* ValueError as e: # перехватывает все ValueError из группы
for err in e.exceptions:
print(f"Перехвачено ValueError: {err}")
except* TypeError as e: # перехватывает все TypeError
for err in e.exceptions:
print(f"Перехвачено TypeError: {err}")
asyncio.run(main())
'''
Вывод:
Перехвачено ValueError: Ошибка в task1
Перехвачено TypeError: Ошибка в task2
'''
Подводные камни except*
- except* нельзя комбинировать с обычным except в одном обработчике (`except* ValueError as e, TypeError as e2` — так нельзя);
- except* работает только с ExceptionGroup — для обычных исключений он не нужен;uvicorn --reload или gunicorn --reload, при любом изменении кода полностью перезапускают сервер. Это может занимать целую вечность, если проект крупный.
Одна команда реализовала такую перезагрузку «на месте» с помощью Dependency Graph. При изменении файла система определяет все связанные с ним модули и обновляет только их.
Используя карту зависимостей и отслеживание порядка импорта, удалось сократить время обновления с 4,8 секунды до 6 миллисекунд.
✍️ — бывало, подбешивало
🗿 — ну и пускай перезагружается с нуля
#факт
@zen_of_pythonmatch-case.
match user:
case User(name="Admin", role=AdminRole()) as admin:
return admin.get_permissions()
case User(name=name, role="editor") if is_senior(name):
return editor_permissions()
case _:
return default_permissions()
- Если объект user является экземпляром класса User с атрибутом name, равным "Admin", и атрибутом role, являющимся экземпляром AdminRole, то он присваивается переменной admin, и вызывается метод get_permissions();
- Если user — это User с ролью "editor" и именем, удовлетворяющим условию is_senior(name), то возвращаются разрешения редактора.
- Во всех остальных случаях возвращаются разрешения по умолчанию.
Под капотом сопоставление по атрибутам работает следующим образом:
- Проверяется, является ли объект экземпляром указанного класса;
- Затем происходит попытка сопоставления указанных атрибутов объекта с заданными значениями или шаблонами;
- Если все условия выполняются, сопоставление считается успешным, и можно использовать переменные, полученные в результате сопоставления.
try:
...
except ExceptionA, ExceptionB, ExceptionC:
...
#факт
@zen_of_python
Available now! Telegram Research 2025 — the year's key insights 
