12.07.2015 Views

Is Python a

Is Python a

Is Python a

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6. You create a class instance by calling the class name as though it were a function;any arguments passed into the class name show up as arguments two andbeyond in the _ _init_ _ constructor method. The new instance remembers theclass it was created from for inheritance purposes.7. You create a class by running a class statement; like function definitions, thesestatements normally run when the enclosing module file is imported (more onthis in the next chapter).8. You specify a class’ superclasses by listing them in parentheses in the class statement,after the new class’ name. The left-to-right order in which the classes arelisted in the parentheses gives the left-to-right inheritance search order in theclass tree.464 | Chapter 22: OOP: The Big Picture

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

Saved successfully!

Ooh no, something went wrong!