- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Object-Oriented
Programming
面向对象编程
Chapter Topics
本章主题
? Introduction
? Object-Oriented Programming
? Classes
? Instances
? Binding and Method Invocation
? Subclassing, Derivation, and Inheritance
? Built-in Functions
? Customizing Classes
? Privacy
? Delegation and Wrapping
? Advanced Features of New-Style Classes
? Related Modules
13
Classes finally introduce the notion of object-oriented programming
C
(OOP) to our picture. We will first present a high-level overview, cov- ering all the main aspects of using classes and OOP in Python. The remainder of the chapter examines details on classes, class instances, and methods. We will also describe derivation or subclassing in Python and what its inheritance model is. Finally, Python gives programmers the ability to cus- tomize classes with special functionality, including those that overload opera- tors and emulate Python types. We will show you how to implement some of these special methods to customize your classes so that they behave more
like Python’s built-in types.
With this said, however, we would like to add that there have been some exciting changes with regard to Python OOP. In version 2.2, the Python com- munity finally saw the unification of types and classes, and with the new-style classes come much more advanced OOP features. New-style classes repre- sent a superset of features from classic (or old-style) classes, the original class objects since Python was born.
We will first present the core features common to both types of classes, and then introduce those more advanced features found only in Python’s new-style classes.
Introduction
介绍
Before we get into the nitty-gritty of OOP and classes, we begin with a high- level overview, then present some simple examples to get you warmed up. If you are new to object-oriented programming, you may wish to skim this sec- tion first, then begin the formal reading in Section 13.2. If you are already familiar with object-o
您可能关注的文档
最近下载
- 教科版五年级上册小学科学第一单元《光》测试卷(含答案).pdf VIP
- 08K507-1~2、08R418-1~2 管道与设备绝热.pdf VIP
- UV固化灯.pdf VIP
- 第二单元 第5课《网络协议分层设》教学设计2024-2025学年人教版(2024)初中信息科技七年级上册.docx
- 竞选大学心理委员PPT模板.pptx VIP
- 《生态学》第5章 生态系统生态学-教学课件(非AI生成).ppt
- 新22J01 工程做法参考图集.docx VIP
- 外来施工人员的安全培训.pptx VIP
- 一种梁板式高桩码头上部结构的施工方法.pdf VIP
- 医用耗材集中采购对医疗资源配置优化与公平性的探讨.docx
文档评论(0)