Библиотека Python разработчика | Книги по питону
Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍 По всем вопросам @evgenycarter РКН clck.ru/3Ko7Hq
Mostrar más📈 Análisis del canal de Telegram Библиотека Python разработчика | Книги по питону
El canal Библиотека Python разработчика | Книги по питону (@bookpython) en el segmento lingüístico de Ruso es un actor destacado. Actualmente la comunidad reúne a 18 312 suscriptores, ocupando la posición 7 332 en la categoría Tecnologías y Aplicaciones y el puesto 36 891 en la región Rusia.
📊 Métricas de audiencia y dinámica
Desde su creación el невідомо, el proyecto ha mostrado un crecimiento acelerado, reuniendo a 18 312 suscriptores.
Según los últimos datos del 11 junio, 2026, el canal mantiene una actividad estable. En los últimos 30 días la variación de miembros fue de -82, y en las últimas 24 horas de 0, conservando un alto alcance.
- Estado de verificación: No verificado
- Tasa de interacción (ER): El promedio de interacción de la audiencia es 5.51%. Durante las primeras 24 horas tras publicar, el contenido suele obtener 2.69% de reacciones respecto al total de suscriptores.
- Alcance de las publicaciones: Cada publicación recibe en promedio 1 009 visualizaciones. En el primer día suele acumular 492 visualizaciones.
- Reacciones e interacción: La audiencia responde de forma activa: el promedio de reacciones por publicación es 2.
- Intereses temáticos: El contenido se centra en temas clave como numbers, yield, модуль, none, декоратор.
📝 Descripción y política de contenido
El autor describe el recurso como un espacio para expresar opiniones subjetivas:
“Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍
По всем вопросам @evgenycarter
РКН clck.ru/3Ko7Hq”
Gracias a la alta frecuencia de actualizaciones (últimos datos recibidos el 12 junio, 2026), el canal mantiene la vigencia y un amplio alcance. La analítica demuestra que la audiencia interactúa activamente con el contenido, lo que lo convierte en un punto de referencia dentro de la categoría Tecnologías y Aplicaciones.
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(), который генерирует случайный текст, но, как видите в примере, результат получается неосмысленный.
Вообще методов в пакете много, продемонстрировать все в одном посте нереально, поэтому можете почитать больше в документации.
Плюс здесь еще в том, что данные можно локализировать под свой язык. Для примера мы поставили русский.
¡Ya disponible! Investigación de Telegram 2025 — los principales insights del año 
