Python Programming for Raspberry Pi, Sams Teach Yourself in 24 Hours (Sams Teach Yourself -- Hours) by Blum Richard & Bresnahan Christine

Python Programming for Raspberry Pi, Sams Teach Yourself in 24 Hours (Sams Teach Yourself -- Hours) by Blum Richard & Bresnahan Christine

Author:Blum, Richard & Bresnahan, Christine [Blum, Richard]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2015-12-09T16:00:00+00:00


A. No, Python doesn’t support protected methods. You can, however, use the same idea as with private attributes and name your method starting with two underscores. The method is still publicly accessible, just not using the normal name.

Q. Does Python support class inheritance?

A. Yes, you can allow a class to inherit attributes and methods from another class. That’s covered in Hour 15, “Employing Inheritance.”

Workshop

Quiz

1. Which method should you define to create default values in a class constructor?



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.