Библиотека 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 332 in the Technologies & Applications category and 36 891 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 11 June, 2026, the channel demonstrates stable activity. Although there has been a change in the number of participants by -82 over the last 30 days and by 0 over the last 24 hours, overall reach remains high.
- Verification status: Not verified
- Engagement rate (ER): The average audience engagement rate is 5.51%. Within the first 24 hours after publication, content typically collects 2.69% reactions from the total number of subscribers.
- Post reach: On average, each post receives 1 009 views. Within the first day, a publication typically gains 492 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 12 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.
logging module is to call functions directly from it, without creating a logger object.
import logging
logging.error('xxx')
This global logger can be configured via the logging.basicConfig() call:
import logging
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # -- xxx --
Due to its global nature, basicConfig has some limitation. First, only the first call actually does something, any further calls of basicConfig are entirely ignored. Second, any function that writes a log message calls basicConfig, so you must configure logging before logging any messages:
import logging
logging.error('xxx') # ERROR:root:xxx
logging.basicConfig(format='-- %(message)s --')
logging.error('xxx') # ERROR:root:xxxif:
def __init__(self, cache=None):
if cache is None:
cache = {}
self._cache = cache
It can be rewritten a little shorter:
def __init__(self, cache=None):
self._cache = cache or {}
This method a couple of drawbacks though. First, the intent of such or may not be clean enough since it is usually used in boolean context. Second, or checks for False, not for None, that can lead to obscure bugs.inspect помогает разработчикам исследовать уже написанные программы.
Сегодня поговорим только про getsource(), который возвращает весь исходный код функции, класса или модуля в виде строки.
В аргументы достаточно передать необходимый объект. Но важно отметить, что встроенные функции не получится проинспектировать.
#python
Подписывайтесь на канал 👉@coddy_academycaptcha и Pillow, который используется для создание изображений в captcha.
Все максимально просто, за нас по сути все делает уже написанный в модуле код. Создаем объект изображения ImageCaptcha, на который будет нанесен текст. После чего вызываем метод write с заданным текстом и именем файла, в который будет записано изображение.
Подписывайтесь на канал 👉@pythonofffIn : format(0.1, '.17f')
Out: '0.10000000000000001'
The decimal module lets you use decimal floating point arithmetic with arbitrary precision:
In : Decimal(1) / Decimal(3)
Out: Decimal('0.3333333333333333333333333333')
That's still can be not enough:
In [61]: Decimal(1) / Decimal(3) * Decimal(3) == Decimal(1)
Out[61]: False
For perfect computations, you can use fractions, that stores any number as a rational one:
In : Fraction(1) / Fraction(3) * Fraction(3) == Fraction(1)
Out: True
The obvious limitation is you still have to use approximations to irrational numbers (such as π).collections.defaultdict allows you to create a dictionary that returns the default value if the requested key is missing (instead of raising KeyError). To create a defaultdict you should provide not a default value but a factory of such values.
That allows you to create a dictionary that virtually contains infinite levels of nested dicts, allowing you to do something like d[a][b][c]...[z].
>>> def infinite_dict():
... return defaultdict(infinite_dict)
...
>>> d = infinite_dict()
>>> d[1][2][3][4] = 10
>>> dict(d[1][2][3][5])
{}
Such behavior is called “autovivification”, the term came from the Perl language.NotImplentedError exception:
def human_name(self):
raise NotImplementedError
Though it's pretty popular and even has IDE support (PyCharm considers such method to be abstract), this approach has a downside. You get the error only upon method call, not upon class instantiation.
Use abc to avoid this problem:
from abc import ABCMeta, abstractmethod
class Service(metaclass=ABCMeta):
@abstractmethod
def human_name(self):
pass
Also be aware that NotImplemented is not the same that NotImplementedError. It's not even an exception. It's a special value (like True and False) that has an absolutely different meaning. Some special methods may return it (e.g., __eq__(), __add__(), etc.) so Python tries to reflect operation. If a.__add__(b) returns NotImplemented, Python tries to call b.__radd__.name(), addres(), email() и job() создадут для вас случайные имена, адреса, почты и названия работ.
Еще есть метод text(), который генерирует случайный текст, но, как видите в примере, результат получается неосмысленный.
Вообще методов в пакете много, продемонстрировать все в одном посте нереально, поэтому можете почитать больше в документации.
Плюс здесь еще в том, что данные можно локализировать под свой язык. Для примера мы поставили русский.
Available now! Telegram Research 2025 — the year's key insights 
