- Python 3 Object:oriented Programming(Second Edition)
- Dusty Phillips
- 114字
- 2021-07-16 20:44:32
Chapter 3. When Objects Are Alike
In the programming world, duplicate code is considered evil. We should not have multiple copies of the same, or similar, code in different places.
There are many ways to merge pieces of code or objects that have a similar functionality. In this chapter, we'll be covering the most famous object-oriented principle: inheritance. As discussed in Chapter 1, Object-oriented Design, inheritance allows us to create is a relationships between two or more classes, abstracting common logic into superclasses and managing specific details in the subclass. In particular, we'll be covering the Python syntax and principles for:
- Basic inheritance
- Inheriting from built-ins
- Multiple inheritance
- Polymorphism and duck typing
推薦閱讀
- 軟件安全技術
- Python編程自學手冊
- Java面向對象軟件開發
- 深度學習經典案例解析:基于MATLAB
- Vue.js前端開發基礎與項目實戰
- Object-Oriented JavaScript(Second Edition)
- Silverlight魔幻銀燈
- Apache Mesos Essentials
- 軟件架構:Python語言實現
- PhoneGap Mobile Application Development Cookbook
- BeagleBone Black Cookbook
- IoT Projects with Bluetooth Low Energy
- Mapping with ArcGIS Pro
- Visual Basic語言程序設計上機指導與練習(第3版)
- 你必須知道的.NET(第2版)