Skip to content

Commit 2e94508

Browse files
committed
Fixed issues in comments.
1 parent b0791ff commit 2e94508

23 files changed

Lines changed: 93 additions & 105 deletions

File tree

src/AbstractFactory/Conceptual/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""
22
EN: Abstract Factory Design Pattern
33
4-
Intent: Provide an interface for creating families of related or dependent
5-
objects without specifying their concrete classes.
4+
Intent: Lets you produce families of related objects without specifying their
5+
concrete classes.
66
77
RU: Паттерн Абстрактная Фабрика
88

src/Adapter/Conceptual/main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
"""
22
EN: Adapter Design Pattern
33
4-
Intent: Convert the interface of a class into the interface clients expect.
5-
Adapter lets classes work together where they otherwise couldn't, due to
6-
incompatible interfaces.
4+
Intent: Provides a unified interface that allows objects with incompatible
5+
interfaces to collaborate.
76
87
RU: Паттерн Адаптер
98
10-
Назначение: Преобразует интерфейс класса в интерфейс, ожидаемый клиентами.
11-
Адаптер позволяет классам с несовместимыми интерфейсами работать вместе.
9+
Назначение: Позволяет объектам с несовместимыми интерфейсами работать вместе.
1210
"""
1311

1412

src/Bridge/Conceptual/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""
22
EN: Bridge Design Pattern
33
4-
Intent: Decouple an abstraction from its implementation so that the two can vary
5-
independently.
4+
Intent: Lets you split a large class or a set of closely related classes into
5+
two separate hierarchies—abstraction and implementation—which can be developed
6+
independently of each other.
67
78
A
89
/ \ A N
@@ -12,8 +13,8 @@
1213
1314
RU: Паттерн Мост
1415
15-
Назначение: Разделяет абстракцию и реализацию, что позволяет изменять их
16-
независимо друг от друга.
16+
Назначение: Разделяет один или несколько классов на две отдельные иерархии —
17+
абстракцию и реализацию, позволяя изменять их независимо друг от друга.
1718
1819
A
1920
/ \ A N

src/Builder/Conceptual/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
"""
22
EN: Builder Design Pattern
33
4-
Intent: Separate the construction of a complex object from its representation so
5-
that the same construction process can create different representations.
4+
Intent: Lets you construct complex objects step by step. The pattern allows you
5+
to produce different types and representations of an object using the same
6+
construction code.
67
78
RU: Паттерн Строитель
89
9-
Назначение: Отделяет построение сложного объекта от его представления так, что
10-
один и тот же процесс построения может создавать разные представления объекта.
10+
Назначение: Позволяет создавать сложные объекты пошагово. Строитель даёт
11+
возможность использовать один и тот же код строительства для получения разных
12+
представлений объектов.
1113
"""
1214

1315

src/ChainOfResponsibility/Conceptual/main.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
"""
22
EN: Chain of Responsibility Design Pattern
33
4-
Intent: Avoid coupling a sender of a request to its receiver by giving more than
5-
one object a chance to handle the request. Chain the receiving objects and then
6-
pass the request through the chain until some receiver handles it.
4+
Intent: Lets you pass requests along a chain of handlers. Upon receiving a
5+
request, each handler decides either to process the request or to pass it to the
6+
next handler in the chain.
77
88
RU: Паттерн Цепочка обязанностей
99
10-
Назначение: Позволяет избежать привязки отправителя запроса к его получателю,
11-
предоставляя возможность обработать запрос нескольким объектам. Связывает в
12-
цепочку объекты-получатели, а затем передаёт запрос по цепочке, пока некий
13-
получатель не обработает его.
10+
Назначение: Позволяет передавать запросы последовательно по цепочке
11+
обработчиков. Каждый последующий обработчик решает, может ли он обработать
12+
запрос сам и стоит ли передавать запрос дальше по цепи.
1413
"""
1514

1615
from __future__ import annotations

src/Command/Conceptual/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
"""
22
EN: Command Design Pattern
33
4-
Intent: Encapsulate a request as an object, thereby letting you parameterize
5-
clients with different requests (e.g. queue or log requests) and support
6-
undoable operations.
4+
Intent: Turns a request into a stand-alone object that contains all information
5+
about the request. This transformation lets you parameterize methods with
6+
different requests, delay or queue a request's execution, and support undoable
7+
operations.
78
89
RU: Паттерн Команда
910
10-
Назначение: Инкапсулирует запрос как объект, позволяя тем самым параметризовать
11-
клиентов с различными запросами (например, запросами очереди или логирования) и
11+
Назначение: Превращает запросы в объекты, позволяя передавать их как аргументы
12+
при вызове методов, ставить запросы в очередь, логировать их, а также
1213
поддерживать отмену операций.
1314
"""
1415

src/Composite/Conceptual/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""
22
EN: Composite Design Pattern
33
4-
Intent: Compose objects into tree structures to represent part-whole
5-
hierarchies. Composite lets clients treat individual objects and compositions of
6-
objects uniformly.
4+
Intent: Lets you compose objects into tree structures and then work with these
5+
structures as if they were individual objects.
76
87
RU: Паттерн Компоновщик
98
10-
Назначение: Объединяет объекты в древовидные структуры для представления
11-
иерархий часть-целое. Компоновщик позволяет клиентам обрабатывать отдельные
12-
объекты и группы объектов одинаковым образом.
9+
Назначение: Позволяет сгруппировать объекты в древовидную структуру, а затем
10+
работать с ними так, как будто это единичный объект.
1311
"""
1412

1513

src/Decorator/Conceptual/main.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
"""
22
EN: Decorator Design Pattern
33
4-
Intent: Attach additional responsibilities to an object dynamically. Decorators
5-
provide a flexible alternative to subclassing for extending functionality.
4+
Intent: Lets you attach new behaviors to objects by placing these objects inside
5+
special wrapper objects that contain the behaviors.
66
77
RU: Паттерн Декоратор
88
9-
Назначение: Динамически подключает к объекту дополнительную функциональность.
10-
Декораторы предоставляют гибкую альтернативу практике создания подклассов для
11-
расширения функциональности.
9+
Назначение: Позволяет динамически добавлять объектам новую функциональность,
10+
оборачивая их в полезные «обёртки».
1211
"""
1312

1413

src/Facade/Conceptual/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""
22
EN: Facade Design Pattern
33
4-
Intent: Provide a unified interface to a number of classes/interfaces of a
5-
complex subsystem. The Facade pattern defines a higher-level interface that
6-
makes the subsystem easier to use.
4+
Intent: Provides a simplified interface to a library, a framework, or any other
5+
complex set of classes.
76
87
RU: Паттерн Фасад
98
10-
Назначение: Предоставляет единый интерфейс к ряду классов/интерфейсов сложной
11-
подсистемы. Паттерн Фасад определяет интерфейс более высокого уровня, который
12-
упрощает использование подсистемы.
9+
Назначение: Предоставляет простой интерфейс к сложной системе классов,
10+
библиотеке или фреймворку.
1311
"""
1412

1513

src/FactoryMethod/Conceptual/main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""
22
EN: Factory Method Design Pattern
33
4-
Intent: Define an interface for creating an object, but let subclasses decide
5-
which class to instantiate. Factory Method lets a class defer instantiation to
6-
subclasses.
4+
Intent: Provides an interface for creating objects in a superclass, but allows
5+
subclasses to alter the type of objects that will be created.
76
87
RU: Паттерн Фабричный Метод
98
10-
Назначение: Определяет интерфейс для создания объекта, но позволяет подклассам
11-
решать, какого класса создавать экземпляр. Фабричный Метод позволяет классу
12-
делегировать создание экземпляра подклассам.
9+
Назначение: Определяет общий интерфейс для создания объектов в суперклассе,
10+
позволяя подклассам изменять тип создаваемых объектов.
1311
"""
1412

1513

0 commit comments

Comments
 (0)