 .  GoF  Python, C++23, Rust  Java
 


     ,    ?   ,            .  GoF         Python, C++23, Rust  Java.      ,      .





 .  GoF  Python, C++23, Rust  Java








        (Factory Method).       (Gang of Four, GoF).       :  Python, C++23, Rust  Java.      :     ,  , ,     .




 


     :        .     ,    1.2      ,   .




 3.   Python





3.1.    


      ,      ,  , ,       Truck().    .      ,   :    .

      .             create_transport().    ,  .    .

    :   +   ,    .    create      .




3.2.   











Product  .

ConcreteProduct  .

Creator       .

ConcreteCreator   .

 Python     :      (  ),  classmethod     -.    .




3.3.     


 ,       ,    ,      ,    .       :    ,     .

        .       ,     .




3.4.  : 


 01_classic.py:










 3.1  : 










 3.1 ()  : 

.plan_delivery      .    create_transport.   cost_per_km       Python   ,    .




  .


   .

   ,     (https://www.litres.ru/book/aleksey-primak/fabrichnyi-metod-pattern-gof-na-python-c-23-rust-i-java-74810804/)  .

      Visa, MasterCard, Maestro,    ,   ,     ,  PayPal, WebMoney, ., QIWI ,       .


