ZhangZhihui's Blog  
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 102 下一页

2024年8月19日

摘要: Behavioral patterns deal with object interconnection and algorithms. • The Chain of Responsibility pattern The Chain of Responsibility pattern offers 阅读全文
posted @ 2024-08-19 10:37 ZhangZhihuiAAA 阅读(36) 评论(0) 推荐(0)
 
摘要: Behavioral patterns deal with object interconnection and algorithms. • The Strategy pattern Several solutions often exist for the same problem. Consid 阅读全文
posted @ 2024-08-19 10:37 ZhangZhihuiAAA 阅读(30) 评论(0) 推荐(0)

2024年8月18日

摘要: Primer In this primer, we start with the most basic possible example and then we’ll add new capabilities one by one. Simple example: A descriptor that 阅读全文
posted @ 2024-08-18 21:05 ZhangZhihuiAAA 阅读(17) 评论(0) 推荐(0)

2024年8月17日

摘要: # Note that this function is already available in the math module as fsum(). def number_sum(n): if n == 0: return 0 else: return n + number_sum(n - 1) 阅读全文
posted @ 2024-08-17 10:05 ZhangZhihuiAAA 阅读(9) 评论(0) 推荐(0)

2024年8月16日

摘要: A structural design pattern proposes a way of composing objects to provide new functionality. • The adapter pattern The adapter pattern is a structura 阅读全文
posted @ 2024-08-16 16:02 ZhangZhihuiAAA 阅读(28) 评论(0) 推荐(0)
 
摘要: Creational design patterns deal with different aspects of object creation. Their goal is to provide better alternatives for situations where direct ob 阅读全文
posted @ 2024-08-16 09:26 ZhangZhihuiAAA 阅读(17) 评论(0) 推荐(0)
 
摘要: • Single responsibility principle (SRP) • Open-closed principle (OCP) It emphasizes that software entities, such as classes and modules, should be ope 阅读全文
posted @ 2024-08-16 09:18 ZhangZhihuiAAA 阅读(30) 评论(0) 推荐(0)

2024年8月15日

摘要: Introduced in Python 3.8 via the typing module, Protocols offer a more flexible approach than ABCs, known as structural duck typing, where an object i 阅读全文
posted @ 2024-08-15 22:03 ZhangZhihuiAAA 阅读(42) 评论(0) 推荐(0)
 
摘要: Encapsulate What Varies One of the most common challenges in software development is dealing with change. Requirements evolve, technologies advance, a 阅读全文
posted @ 2024-08-15 21:40 ZhangZhihuiAAA 阅读(30) 评论(0) 推荐(0)
 
摘要: A natural way to deal with uncertainty is to introduce probabilistic rules. In the simplest case, we can imagine an FSM-like device having no commands 阅读全文
posted @ 2024-08-15 19:53 ZhangZhihuiAAA 阅读(24) 评论(0) 推荐(0)
上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 102 下一页