Библиотека Python разработчика | Книги по питону
Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍 По всем вопросам @evgenycarter РКН clck.ru/3Ko7Hq
Show more📈 Analytical overview of Telegram channel Библиотека Python разработчика | Книги по питону
Channel Библиотека Python разработчика | Книги по питону (@bookpython) in the Russian language segment is an active participant. Currently, the community unites 18 312 subscribers, ranking 7 334 in the Technologies & Applications category and 36 889 in the Russia region.
📊 Audience metrics and dynamics
Since its creation on невідомо, the project has demonstrated rapid growth, gathering an audience of 18 312 subscribers.
According to the latest data from 12 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -83 over the last 30 days and by -1 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 5.49%. Within the first 24 hours after publication, content typically collects 2.76% reactions from the total number of subscribers.
- Post reach: On average, each post receives 1 006 views. Within the first day, a publication typically gains 505 views.
- Reactions and interaction: The audience actively supports content: the average number of reactions per post is 2.
- Thematic interests: Content is focused on key topics such as numbers, yield, модуль, none, декоратор.
📝 Description and content policy
The author describes the resource as a platform for expressing subjective opinions:
“Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍
По всем вопросам @evgenycarter
РКН clck.ru/3Ko7Hq”
Thanks to the high frequency of updates (latest data received on 13 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.
(x for x in range(100) if random() > 0.5)
If you write an iterable and want to add the hint, define the __length_hint__ method. If the length is known for sure, use __len__ instead.
If you use an iterable and want to know its expected length, use operator.length_hint.__hash__ method. This method can return any integer as long as the only requirement is met: equal objects should have equal hashes (not vice versa).
You also should avoid using mutable objects as keys, because once the object becomes not equal to the old self, it can't be found in a dictionary anymore.
There is also one bizarre thing that might surprise you during debugging or unit testing:
In : class A:
...: def __init__(self, x):
...: self.x = x
...:
...: def __hash__(self):
...: return self.x
...:
In : hash(A(2))
Out: 2
In : hash(A(1))
Out: 1
In : hash(A(0))
Out: 0
In : hash(A(-1)) # sic!
Out: -2
In : hash(A(-2))
Out: -2
In CPython -1 is internally reserved for error states, so it's implicitly converted to -2.in locals() или in globals(), чтобы проверить переменная существует в Python, разница только:
in locals() проверяет если переменная объявлена в локальной зоне видимости
in globals() проверяет если переменная объявлена в глобальной зоне видимости
Подписывайтесь на канал 👉@pythonofffmultiprocessing.Pool is for you. It spawns multiple processes and delegates tasks to them automatically. Simply create a pool with Pool(number_of_processes) and run p.map with the list of inputs.
In : import math
In : from multiprocessing import Pool
In : inputs = [i ** 2 for i in range(100, 130)]
In : def f(x):
...: return len(str(math.factorial(x)))
...:
In : %timeit [f(x) for x in inputs]
1.44 s ± 19.2 ms per loop (...)
In : p = Pool(4)
In : %timeit p.map(f, inputs)
451 ms ± 34 ms per loop (...)== и is
Недавно в чате наши подписчики затрагивали эту тему, поэтому мы решили разложить всё по полочкам, чтобы в дальнейшем не возникало вопросов.
Итак, оператор == проверяет равенство значений двух объектов. А оператор is в свою очередь проверяет идентичность самих объектов. Его используют, чтобы удостовериться, что переменные указывают на один и тот же объект в памяти.
Однако Python в целях производительности кеширует короткие строки и малые целые числа, поэтому возможны некоторые казусы, как в примере.
Подписывайтесь на канал 👉@pythonofffenumerate генерирует кортежи, состоящие из двух элементов – индекса элемента и самого элемента. Эти кортежи можно распаковать еще в заголовке for
Получается короткий и понятный код!
В примере разберем как извлечь из списка элементы и их индекс, рис.1.
Еще одной полезной и крутой фишкой этой функции будет легкое создания счетчика. Более того, мы можем установить первоначальное значение счетчика, рис. 2.
Подписывайтесь на канал 👉@pythonoffflen(), but this is not the rule:
In : len(range(10000))
Out: 10000
In : gen = (x ** 2 for x in range(10000))
In : len(gen)
...
TypeError: object of type 'generator' has no len()
The straightforward solution is to use an intermediate list:
In : len(list(gen))
Out: 10000
Though fully functional, this solution requires enough memory to store all the yielded values. The simple idiom allows to avoid such a waste:
In : sum(1 for _ in gen)
Out: 10000
Available now! Telegram Research 2025 — the year's key insights 
