PERSONAL BLOG
Category: Programming

Шаблоны проектирования. Часть 2. Структурные

Feb. 11, 2025

Эти шаблоны в основном посвящены компоновке объектов (object composition). То есть тому, как сущности могут друг друга использовать. Ещё одно объяснение: структурные шаблоны помогают ответить на вопрос «Как построить программный компонент?»

Python: interpreter, bytecode, PVM

Feb. 17, 2024

Python is interpreted programming language. He doesn't convert the code into machine code (unlike C or C++). Instead, Python interpreter transfers the programming code into bytecode, which is executed on the PVM (Python Virtual Machine). Let's see how it works using an example of the most popular interpreter implementation - CPython.

weakref in Python

Feb. 13, 2024

weakref module allows to create "weak" references to objects. It's not enough to have a weak reference to keep an objects alive - if weak references are the only references the object has, then garbage collector will remove the object and reuse the memory for other objects. However, while the object isn't deleted, a weak reference can return it even if there are no regular references to the objects.