A Methodical Review

In this chapter, you learned the following:

  • Classes are like modules, except that classes contain methods and modules contain functions.

  • Methods are like functions, except that the first argument must be an object of the class in which the method is defined.

  • Method calls in this form—’browning’.capitalize()—are shorthand for this: str.capitalize(’browning’).

  • Methods beginning and ending with two underscores are considered special by Python, and they are triggered by particular syntax.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.189.186