Библиотека Python разработчика | Книги по питону
Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍 По всем вопросам @evgenycarter РКН clck.ru/3Ko7Hq
Ko'proq ko'rsatish📈 Telegram kanali Библиотека Python разработчика | Книги по питону analitikasi
Библиотека Python разработчика | Книги по питону (@bookpython) Rus til segmentidagi kanali faol ishtirokchi. Hozirda hamjamiyat 18 312 obunachidan iborat bo'lib, Texnologiyalar & Aralashmalar toifasida 7 334-o'rinni va Rossiya mintaqasida 36 889-o'rinni egallagan.
📊 Auditoriya ko‘rsatkichlari va dinamika
невідомо sanasidan buyon loyiha tez o‘sib, 18 312 obunachiga ega bo‘ldi.
12 Iyun, 2026 dagi oxirgi ma’lumotlarga ko‘ra kanal barqaror faollikka ega. Oxirgi 30 kunda obunachilar soni -83 ga, so‘nggi 24 soatda esa -1 ga o‘zgardi va umumiy qamrov yuqori darajada qolmoqda.
- Tasdiqlash holati: Tasdiqlanmagan
- Jalb etish (ER): Auditoriya o‘rtacha 5.49% darajada jalb etiladi. Nashrdan keyingi dastlabki 24 soatda kontent odatda umumiy obunachilar sonining 2.76% ini tashkil etuvchi reaksiyalarni to‘playdi.
- Post qamrovi: Har bir post o‘rtacha 1 006 marta ko‘riladi; birinchi sutkada odatda 505 ta ko‘rish yig‘iladi.
- Reaksiyalar va o‘zaro ta’sir: Auditoriya faol: har bir postga o‘rtacha 2 ta reaksiya keladi.
- Tematik yo‘nalishlar: Kontent numbers, yield, модуль, none, декоратор kabi asosiy mavzularga jamlangan.
📝 Tavsif va kontent siyosati
Muallif resursni shaxsiy fikrni ifoda etish maydoni sifatida ta’riflaydi:
“Погружение в CPython и архитектуру. Разбираем неочевидное поведение (GIL, Memory), Best Practices (SOLID, DDD) и тонкости Django/FastAPI. Решаем задачи с подвохом и оптимизируем алгоритмы. 🐍
По всем вопросам @evgenycarter
РКН clck.ru/3Ko7Hq”
Yuqori yangilanish chastotasi (oxirgi ma’lumot 13 Iyun, 2026 da olingan) sababli kanal doimo dolzarb va katta qamrovli bo‘lib qoladi. Analitika auditoriya kontent bilan faol hamkorlik qilishini, uni Texnologiyalar & Aralashmalar toifasidagi muhim ta’sir nuqtasiga aylantirishini ko‘rsatadi.
list allows you to store an array of any objects. This is quite helpful but may be inefficient. The array module can be used to represent arrays of base values compactly. The supported values include various C types including char, int, long, double and so on. The actual representation is determined by the C implementation.
In : a = array.array('B')
In : a.append(240)
In : a.append(159)
In : a.append(144)
In : a.append(180)
In : a.tobytes().decode('utf8')
Out: '🐴'.request, можно просмотреть PreparedRequest.
Проверка PreparedRequest открывает доступ ко всей информации о выполняемом запросе. Это может быть пейлоад, URL, заголовки, аутентификация и многое другое.
Подписывайтесь на канал 👉@pythonofffx = 1
def scope():
x = 2
def inner_scope():
print(x) # prints 2
inner_scope()
scope()
However, the variable assignment doesn't work the same way. The new variable is always created in the current scope unless global or nonlocal is specified:
x = 1
def scope():
x = 2
def inner_scope():
x = 3
print(x) # prints 3
inner_scope()
print(x) # prints 2
scope()
print(x) # prints 1
global allows using variables of global namespaces while nonlocal searches for the variable in the nearest enclosing scope. Compare:
x = 1
def scope():
x = 2
def inner_scope():
global x
x = 3
print(x) # prints 3
inner_scope()
print(x) # prints 2
scope()
print(x) # prints 3
x = 1
def scope():
x = 2
def inner_scope():
nonlocal x
x = 3
print(x) # prints 3
inner_scope()
print(x) # prints 3
scope()
print(x) # prints 1sorted:
In : sorted([1, -1, 2, -3, 3])
Out: [-3, -1, 1, 2, 3]
With the key argument you can provide a function that will be used to get a comparison key of each value. Let's sort the same sequence by absolute values:
In : sorted([1, -1, 2, -3, 3], key=abs)
Out: [1, -1, 2, -3, 3]
Let's suppose we also want to put the numbers with the same absolute value in ascending order. In that case, we can provide a tuple as a comparison key:
In : sorted([1, -1, 2, -3, 3], key=lambda x: (abs(x), x))
Out: [-1, 1, 2, -3, 3]
This is not some sorted magic, this is how tuples are sorted in general:
In : (1, 2) == (1, 2)
Out: True
In : (1, 2) > (1, 1)
Out: True
In : (1, 2) < (2, 1)
Out: True-O and -OO flags.
-O sets __debug__ to False and removes all assert statements from the program. -OO do the same and also discards docstrings.
A regular version of a script is cached to .pyc file while an optimized one is cached to .pyo. However, since Python 3.5 .pyo is no more a thing, .opt-1.pyc and .opt-2.pyc are introduced by PEP 488 instead.float.
Float также можно использовать для преобразования целых чисел в числа с плавающей запятой.
В Python 2 такое преобразование необходимо, но в Python 3 целочисленное деление больше не является чем-то особенным (если вы специально не используете оператор «//»). Поэтому больше не нужно использовать float для этой цели, теперь float(x)/y можно легко заменить на x/y.
Подписывайтесь на канал 👉@pythonofffpython -m module.py, that prevents the traditional if __name__ == '__main__' block from running. Still, all imports will be executed, and this may fail if you want to check syntax in the environment where the module can't be and shouldn't be run.
However, the python standard library contains the py_compile module that generates byte-code from Python source file without running it. That's exactly what we need:
$ python -m py_compile test.c
File "test.c", line 1
int main() {
^
SyntaxError: invalid syntax.d = {} (for dictionaries) but it's not exactly clearing, it's creating a new collection and throwing the old one away. It may work for you, but other owners of the same object will still have a reference to the original one.
The proper way to clear dictionary, set, deque and other collections is to call x.clear().
Endi mavjud! Telegram Tadqiqoti 2025 — yilning asosiy insaytlari 
