Библиотека 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.
try with except Exception, not bare except:
try:
foreign()
except Exception:
logging.warn('fail', exc_info=True)
except without explicit exception type is an equivalent for except BaseException. The difference between BaseException and Exception is that the former includes exceptions you usually don't want to such as KeyboardInterrupt.
@BookPythonlogging. Для создания объекта Logger, вызываем функцию getLogger, передавая в нее имя логера.
Созданный объект Logger предоставляет методы для записи сообщений разного уровня (DEBUG, INFO, WARNING, ERROR, CRITICAL), что удобно для поиска нужной информации с применением фильтров.
По умолчанию в logging задан уровень WARNING, это означает, что сообщения уровня DEBUG и INFO будут игнорироваться при записи в лог. Изменить данное поведение можно с помощью метода setLevel, передав минимальный уровень, который будет отлавливаться.
Для отправки логов в сконфигурированные места используются обработчики. Мы можем использовать уже существующие хэндлеры, либо создать свой класс обработчика, унаследовавшись от базового класса Handler.
@BookPython[]) by defining __getitem__ magic method. This is how you create an object that virtually contains an infinite number of repeated elements:
class Cycle:
def __init__(self, lst):
self._lst = lst
def __getitem__(self, index):
return self._lst[
index % len(self._lst)
]
print(Cycle(['a', 'b', 'c'])[100]) # 'b'
The unusual thing here is that the [] operator supports a unique syntax. It can be used not only like this — [2], but also like this — [2:10], or [2:10:2], or [2::2], or even [:]. The semantic is [start:stop:step], but you can use it any way you want for your custom objects.
But what __getitem__ gets as an index parameter if you call it using that syntax? The slice objects exist precisely for that.
In : class Inspector:
...: def __getitem__(self, index):
...: print(index)
...:
In : Inspector()[1]
1
In : Inspector()[1:2]
slice(1, 2, None)
In : Inspector()[1:2:3]
slice(1, 2, 3)
In : Inspector()[:]
slice(None, None, None)
You can even combine tuple and slice syntaxes:
In : Inspector()[:, 0, :]
(slice(None, None, None), 0, slice(None, None, None))
slice is not doing anything for you except simply storing start, stop and step attributes.
In : s = slice(1, 2, 3)
In : s.start
Out: 1
In : s.stop
Out: 2
In : s.step
Out: 3venv, который позволяет создавать виртуальные окружения удобно и быстро. Пример представлен на картинке.
Скрипт activate в директории bin предназначен для активации окружения, а команда deactivate в уже активированном окружении — для выхода из него.
В случае успешного создания и активации у вас в терминале должно появится название вашего виртуального окружения в круглых скобках.
Подписывайтесь на канал 👉@pythonofffoverride modifier), in some languages it's optional (the @Override annotation in Java). Python doesn't require any special modifier nor does it have a standard way to mark such methods (some people like to use a custom @override decorator that does virtually nothing, just for the sake of readability).
Overloading is another story. Overloading is having multiple functions with the same name but different signatures. It's supported by languages like Java and C++ and is often used as a way to provide default arguments:
class Foo {
public static void main(String[] args) {
System.out.println(Hello());
}
public static String Hello() {
return Hello("world");
}
public static String Hello(String name) {
return "Hello, " + name;
}
}
Python doesn't support finding functions by their signatures, only be their names. You can write code that analyzes the types and number of arguments explicitly. That usually looks clumsy and generally is not a nice thing to do:
def quadrilateral_area(*args):
if len(args) == 4:
quadrilateral = Quadrilateral(*args)
elif len(args) == 1:
quadrilateral = args[0]
else:
raise TypeError()
return quadrilateral.area()
If you need type hints for this, the typing module can help you with the @overload decorator:
from typing import overload
@overload
def quadrilateral_area(
q: Quadrilateral
) -> float: ...
@overload
def quadrilateral_area(
p1: Point, p2: Point,
p3: Point, p4: Point
) -> float: ...
@BookPython exit создана для удобства работы в интерактивном режиме, однако не рекомендуется использовать её внутри скриптов.
По факту функция просто поднимают исключение SystemExit. А при попытке вызова без скобок напишут подсказку о правильном способе выхода из интерпретатора.
Использовать sys.exit() стоит потому, что этот метод лежит в стандартном модуле и всегда там доступен. Также это довольно явный способ завершения программы.
@BookPython__file__ returns the relative path to it:
$ cat test/foo.py
print(__file__)
$ python test/foo.py
test/foo.py
The typical usage for that is to find the path where the script is located. It can be helpful for finding other files such as configs, assets, etc.
To get the absolute path form the relative one you can use os.path.abspath. So the common idiom to get the script directory path is:
dir_path = os.path.dirname(
os.path.abspath(__file__)
)
Available now! Telegram Research 2025 — the year's key insights 
