12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Brain Builder 445Chapter Quiz 445Quiz Answers 445Brain Builder: Part V Exercises 446Part VI.Classes and OOP22. OOP: The Big Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451Why Use Classes? 452OOP from 30,000 Feet 453Attribute Inheritance Search 453Classes and Instances 455Class Method Calls 456Coding Class Trees 456OOP <strong>Is</strong> About Code Reuse 459Chapter Summary 462Brain Builder 463Chapter Quiz 463Quiz Answers 46323. Class Coding Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465Classes Generate Multiple Instance Objects 465Class Objects Provide Default Behavior 466Instance Objects Are Concrete Items 466A First Example 467Classes Are Customized by Inheritance 469A Second Example 470Classes Are Attributes in Modules 471Classes Can Intercept <strong>Python</strong> Operators 472A Third Example 474Why Use Operator Overloading? 475The World’s Simplest <strong>Python</strong> Class 476Chapter Summary 478Brain Builder 479Chapter Quiz 479Quiz Answers 479Table of Contents | xxiii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!