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 289 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 289 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.
JOIN.
#основы #sql
@zen_of_python
def calculate_discount(items, discount):
return [item * (1 - discount) for item in items]
Всё работает, но не совсем понятно:
— Что именно items? Список? Кортеж? Генератор?
— Какой тип у discount?
— Что возвращает функция?
Код «самопроясняется», если добавить typing.List:
from typing import List
def calculate_discount(items: List[float], discount: float) -> List[float]:
return [item * (1 - discount) for item in items]
Мы можем пойти дальше. Зачем ограничивать функцию только List[float], если она также могла бы принять кортеж, множество или генератор?
from collections.abc import Iterable
def calculate_discount(items: Iterable[float], discount: float) -> List[float]:
return [item * (1 - discount) for item in items]
Теперь items — любая итерируемая структура: список, кортеж, генератор. Такой подход делает функцию более универсальной.
Это и есть главное преимущество Type Hints: они заставляют задуматься — а не слишком ли жёсткие ограничения я накладываю на входные данные? А не стоит ли сделать интерфейс функции более абстрактным?
Допустим, вы проектируете класс заказа. Если сначала использовали List для хранения товаров, то подумав о типах, вы можете заменить это на Set, чтобы избежать повторений. Или вместо хранения всех элементов в памяти начать использовать генератор для ленивой загрузки данных из базы.
Аннотации типов подталкивают вас к обобщённому проектированию, где функции и классы не зависят от конкретных реализаций.
Входы — как можно шире, выходы — как можно конкретнее.#основы @zen_of_python
Available now! Telegram Research 2025 — the year's key insights 
