Python Portal
Всё самое интересное из мира Python Сотрудничество, реклама: @devmangx Менеджер: @Spiral_Yuri РКН: https://clck.ru/3GMMF6
Show more📈 Analytical overview of Telegram channel Python Portal
Channel Python Portal (@pythonportal) in the Russian language segment is an active participant. Currently, the community unites 52 460 subscribers, ranking 2 547 in the Technologies & Applications category and 11 911 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 52 460 subscribers.
According to the latest data from 10 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -783 over the last 30 days and by -20 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 9.32%. Within the first 24 hours after publication, content typically collects 5.78% reactions from the total number of subscribers.
- Post reach: On average, each post receives 4 892 views. Within the first day, a publication typically gains 3 033 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 25.
- Thematic interests: Content is focused on key topics such as строка, none, true, модуль, peter.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Всё самое интересное из мира Python
Сотрудничество, реклама: @devmangx
Менеджер: @Spiral_Yuri
РКН: https://clck.ru/3GMMF6”
Thanks to the high frequency of updates (latest data received on 11 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.
Cmd + Shift + P → Disable Auto Updating Extensions)
- Используйте статический анализатор zizmor для GitHub Actions, чтобы выявлять потенциальные проблемы безопасности
- Используйте actions-up для обновления GitHub Actions до актуальных версий с SHA-pinning
- Добавьте Socket Free Firewall или safe-chain при установке npm-пакетов, чтобы снизить риски атак через цепочку поставок (supply chain attacks)
👉 @PythonPortal"é" == "é" может возвращать False в Python
Вот один из типичных Unicode-подводных камней, который часто приводит к очень запутанным багам в Python:
Две строки могут выглядеть одинаково на экране, но при этом отличаться внутри:
import unicodedata
a = "é" # один кодпоинт: U+00E9
b = "e\u0301" # "e" + комбинирующий акцент (acute accent)
print(a)
print(b)
print(a == b)
# False
print(len(a))
# 1
print(len(b))
# 2
Внешне они одинаковые, но Python хранит их как разные последовательности Unicode-кодпоинтов.
Посмотреть, что реально внутри строки, можно через repr() и unicodedata.name():
import unicodedata
for char in "e\u0301":
print(repr(char), unicodedata.name(char))
Вывод:
'e' LATIN SMALL LETTER E '́' COMBINING ACUTE ACCENTКак правильно сравнивать такие строки? Нужно нормализовать Unicode перед сравнением:
import unicodedata
a = "é"
b = "e\u0301"
a_normalized = unicodedata.normalize("NFC", a)
b_normalized = unicodedata.normalize("NFC", b)
print(a_normalized == b_normalized)
# True
NFC приводит текст к “составной” форме, где комбинация "e" + accent превращается в один символ "é".
Такие различия часто появляются в:
- пользовательском вводе
- копипасте из разных источников
- именах файлов
- поиске и фильтрации текста
- данных из разных языков и систем
Ещё один похожий кейс — невидимые символы
Например, zero-width space может ломать сравнение вообще без визуальных признаков:
text = "hello\u200b"
print(text == "hello")
# False
print(text)
# hello
print(repr(text))
# 'hello\u200b'
print() скрывает проблему, но repr() показывает реальное содержимое строки.
Подробнее можно почитать здесь:
https://pythonkoans.substack.com/p/koan-15-the-invisible-ink
👉 @PythonPortaldef generate_transactions_inefficient(df: pd.DataFrame):
transactions = []
for _, row in df.iterrows():
transactions.append({
'user_id': row['user_id'],
'amount': row['amount'],
'transaction_date': row['transaction_date'],
'status': row['status']
})
return transactions
Проблема в том, что такой подход сохраняет ВСЕ обработанные строки в памяти перед тем, как что-либо вернуть. Это как приготовить 10 000 блюд и хранить их все на кухне — место быстро закончится.
👉Лучший подход — использовать yield:
def generate_transactions_efficient(df: pd.DataFrame):
for _, row in df.iterrows():
yield {
'user_id': row['user_id'],
'amount': row['amount'],
'transaction_date': row['transaction_date'],
'status': row['status']
}
Вместо того чтобы собирать один большой список в памяти, эта функция выдаёт по одной транзакции за раз, только когда это нужно. Это как готовить блюда только по мере поступления заказов. Проблем с памятью здесь нет.
👉 @PythonPortal
Available now! Telegram Research 2025 — the year's key insights 
