.  GoF  Python, C++23, Rust  Java
 


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





.  GoF  Python, C++23, Rust  Java








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




 


     :        .     ,    1.2      ,   .




 20.   Python





20.1.   


  -  , , ,   .      ,   .    .        ,    if self.status == ,         .

        .   ()         .      .  ,    .

 Python    ,          ,     .




20.2.   











Context ,     ;   .

State  .

Concrete State         .




20.3.  : 


 01_order_states.py:










 20.1  : 










 20.1 ()  : 










 20.1 ()  : 

.       ,       .         if status ==     -    :     ,      .  ,   ,         ,     .




  .


   .

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

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


