MCPcopy Create free account

hub / github.com/RefactoringGuru/design-patterns-python / functions

Functions212 in github.com/RefactoringGuru/design-patterns-python

↓ 1 callersMethodvisit_concrete_component_a
(self, element: ConcreteComponentA)
src/Visitor/Conceptual/main.py:95
↓ 1 callersMethodvisit_concrete_component_b
(self, element: ConcreteComponentB)
src/Visitor/Conceptual/main.py:99
Method__call__
EN: Possible changes to the value of the `__init__` argument do not affect the returned instance. RU: Данная реализация не у
src/Singleton/Conceptual/NonThreadSafe/main.py:28
Method__call__
EN: Possible changes to the value of the `__init__` argument do not affect the returned instance. RU: Данная реализация не у
src/Singleton/Conceptual/ThreadSafe/main.py:35
Method__copy__
Create a shallow copy. This method will be called whenever someone calls `copy.copy` with this object and the returned value is retur
src/Prototype/Conceptual/main.py:25
Method__deepcopy__
Create a deep copy. This method will be called whenever someone calls `copy.deepcopy` with this object and the returned value is retu
src/Prototype/Conceptual/main.py:45
Method__getitem__
(self, index: int)
src/Iterator/Conceptual/main.py:104
Method__init__
(self, component: Component)
src/Decorator/Conceptual/main.py:57
Method__init__
(self, shared_state: str)
src/Flyweight/Conceptual/main.py:33
Method__init__
(self, initial_flyweights: Dict)
src/Flyweight/Conceptual/main.py:57
Method__init__
(self, value: str)
src/Singleton/Conceptual/ThreadSafe/main.py:86
Method__init__
(self, payload: str)
src/Command/Conceptual/main.py:40
Method__init__
EN: Complex commands can accept one or several receiver objects along with any context data via the constructor. RU: Сложные
src/Command/Conceptual/main.py:57
Method__init__
(self, collection: WordsCollection, reverse: bool = False)
src/Iterator/Conceptual/main.py:57
Method__init__
(self, collection: list[Any] | None = None)
src/Iterator/Conceptual/main.py:100
Method__init__
(self, component1: Component1, component2: Component2)
src/Mediator/Conceptual/main.py:35
Method__init__
(self, mediator: Mediator = None)
src/Mediator/Conceptual/main.py:60
Method__init__
(self, real_subject: RealSubject)
src/Proxy/Conceptual/main.py:60
Method__init__
(self, state: State)
src/State/Conceptual/main.py:36
Method__init__
(self, implementation: Implementation)
src/Bridge/Conceptual/main.py:42
Method__init__
(self)
src/Prototype/Conceptual/main.py:5
Method__init__
(self, some_int, some_list_of_objects, some_circular_ref)
src/Prototype/Conceptual/main.py:20
Method__init__
(self, state: str)
src/Memento/Conceptual/main.py:41
Method__init__
(self, state: str)
src/Memento/Conceptual/main.py:105
Method__init__
(self, originator: Originator)
src/Memento/Conceptual/main.py:143
Method__init__
(self, adaptee: Adaptee)
src/Adapter/Conceptual/object/main.py:51
Method__init__
EN: Depending on your application's needs, you can provide the Facade with existing subsystem objects or force the Facade to create t
src/Facade/Conceptual/main.py:31
Method__init__
EN: Usually, the Context accepts a strategy through the constructor, but also provides a setter to change it at runtime. RU:
src/Strategy/Conceptual/main.py:27
Method__init__
EN: A fresh builder instance should contain a blank product object, which is used in further assembly. RU: Новый экземпляр с
src/Builder/Conceptual/main.py:59
Method__init__
(self)
src/Builder/Conceptual/main.py:133
Method__init__
(self)
src/Builder/Conceptual/main.py:156
Method__init__
(self)
src/Composite/Conceptual/main.py:123
Method__iter__
EN: The __iter__() method returns the iterator object itself, by default we return the iterator in ascending order. RU: Мето
src/Iterator/Conceptual/main.py:107
Method__next__
EN: Optimization: sorting happens only when the first items is actually requested. RU: Оптимизация: сортировка происходит то
src/Iterator/Conceptual/main.py:63
Methodaccept
EN: Note that we're calling `visitConcreteComponentA`, which matches the current class name. This way we let the visitor know the cla
src/Visitor/Conceptual/main.py:42
Methodaccept
(self, visitor: Visitor)
src/Visitor/Conceptual/main.py:76
Methodadd
(self, component: Component)
src/Composite/Conceptual/main.py:134
Methodanother_useful_function_b
(self, collaborator: AbstractProductA)
src/AbstractFactory/Conceptual/main.py:163
Methodanother_useful_function_b
EN: The variant, Product B2, is only able to work correctly with the variant, Product A2. Nevertheless, it accepts any instance of
src/AbstractFactory/Conceptual/main.py:172
Methodattach
(self, observer: Observer)
src/Observer/Conceptual/main.py:94
Methodbuilder
(self)
src/Builder/Conceptual/main.py:160
Methodcomponent
EN: The Decorator delegates all work to the wrapped component. RU: Декоратор делегирует всю работу обёрнутому компоненту.
src/Decorator/Conceptual/main.py:61
Methodcontext
(self)
src/State/Conceptual/main.py:77
Methodcreate_product_a
(self)
src/AbstractFactory/Conceptual/main.py:56
Methodcreate_product_a
(self)
src/AbstractFactory/Conceptual/main.py:70
Methodcreate_product_b
(self)
src/AbstractFactory/Conceptual/main.py:59
Methodcreate_product_b
(self)
src/AbstractFactory/Conceptual/main.py:73
Methoddetach
(self, observer: Observer)
src/Observer/Conceptual/main.py:98
Methoddo_algorithm
(self, data: List)
src/Strategy/Conceptual/main.py:111
Methoddo_algorithm
(self, data: List)
src/Strategy/Conceptual/main.py:116
Methodexecute
(self)
src/Command/Conceptual/main.py:43
Methodexecute
EN: Commands can delegate to any methods of a receiver. RU: Команды могут делегировать выполнение любым методам получателя.
src/Command/Conceptual/main.py:71
Methodfactory_method
(self)
src/FactoryMethod/Conceptual/main.py:91
Methodfactory_method
(self)
src/FactoryMethod/Conceptual/main.py:96
Methodget_date
(self)
src/Memento/Conceptual/main.py:100
Methodget_date
(self)
src/Memento/Conceptual/main.py:128
Methodget_name
EN: The rest of the methods are used by the Caretaker to display metadata. RU: Остальные методы используются Опекуном для от
src/Memento/Conceptual/main.py:118
Methodhandle
(self, request: Any)
src/ChainOfResponsibility/Conceptual/main.py:61
Methodhandle
(self, request: Any)
src/ChainOfResponsibility/Conceptual/main.py:78
Methodhandle
(self, request: Any)
src/ChainOfResponsibility/Conceptual/main.py:86
Methodhandle
(self, request: Any)
src/ChainOfResponsibility/Conceptual/main.py:94
Methodhandle1
(self)
src/State/Conceptual/main.py:103
Methodhandle1
(self)
src/State/Conceptual/main.py:113
Methodhandle2
(self)
src/State/Conceptual/main.py:108
Methodhandle2
(self)
src/State/Conceptual/main.py:116
Methodhook1
(self)
src/TemplateMethod/Conceptual/main.py:125
Methodis_composite
(self)
src/Composite/Conceptual/main.py:142
Methodmediator
(self)
src/Mediator/Conceptual/main.py:64
Methodnotify
(self, sender: object, event: str)
src/Mediator/Conceptual/main.py:41
Methodnotify
EN: Notify all observers about an event. RU: Уведомляет всех наблюдателей о событии.
src/Observer/Conceptual/main.py:58
Methodoperation
(self)
src/Decorator/Conceptual/main.py:36
Methodoperation
(self)
src/Decorator/Conceptual/main.py:70
Methodoperation
EN: Decorators may call parent implementation of the operation, instead of calling the wrapped object directly. This approach simplif
src/Decorator/Conceptual/main.py:83
Methodoperation
(self)
src/Decorator/Conceptual/main.py:105
Methodoperation
(self)
src/FactoryMethod/Conceptual/main.py:122
Methodoperation
(self)
src/FactoryMethod/Conceptual/main.py:127
Methodoperation
(self)
src/Bridge/Conceptual/main.py:58
Methodoperation
EN: The base Component may implement some default behavior or leave it to concrete classes (by declaring the method containing the be
src/Composite/Conceptual/main.py:79
Methodoperation
EN: The Composite executes its primary logic in a particular way. It traverses recursively through all its children, collecting and s
src/Composite/Conceptual/main.py:145
Methodoperation1
(self)
src/Facade/Conceptual/main.py:92
Methodoperation_implementation
(self)
src/Bridge/Conceptual/main.py:93
Methodoperation_implementation
(self)
src/Bridge/Conceptual/main.py:98
Methodparent
(self)
src/Composite/Conceptual/main.py:29
Methodproduce_part_a
(self)
src/Builder/Conceptual/main.py:106
Methodproduce_part_b
(self)
src/Builder/Conceptual/main.py:109
Methodproduce_part_c
(self)
src/Builder/Conceptual/main.py:112
Methodproduct
(self)
src/Builder/Conceptual/main.py:32
Methodproduct
EN: Concrete Builders are supposed to provide their own methods for retrieving results. That's because various types of builders may
src/Builder/Conceptual/main.py:73
Methodremove
(self, component: Component)
src/Composite/Conceptual/main.py:138
Methodrequest
(self)
src/Proxy/Conceptual/main.py:31
Methodrequest
(self)
src/Proxy/Conceptual/main.py:49
Methodrequest
(self)
src/Adapter/Conceptual/class/main.py:51
Methodrequest
(self)
src/Adapter/Conceptual/object/main.py:54
Methodrequired_operations1
(self)
src/TemplateMethod/Conceptual/main.py:103
Methodrequired_operations1
(self)
src/TemplateMethod/Conceptual/main.py:119
Methodrequired_operations2
(self)
src/TemplateMethod/Conceptual/main.py:106
Methodrequired_operations2
(self)
src/TemplateMethod/Conceptual/main.py:122
Methodset_next
(self, handler: Handler)
src/ChainOfResponsibility/Conceptual/main.py:49
Methodsome_business_logic
EN: Finally, any singleton should define some business logic, which can be executed on its instance. RU: Наконец, любой один
src/Singleton/Conceptual/NonThreadSafe/main.py:43
Methodsome_business_logic
EN: Finally, any singleton should define some business logic, which can be executed on its instance. RU: Наконец, любой один
src/Singleton/Conceptual/ThreadSafe/main.py:89
← previousnext →101–200 of 212, ranked by callers