Object Oriented Programming with Python
Object Oriented Programming with Python
Learn essentials of OOP with Python 3
About the Book
Have gotten started with Python 3 and finding Object Oriented Programming difficult? Do not worry. We are here to assist you on the quest of understanding the very Philosophy of Object Oriented Programming with Python 3. We present our decades of cumulative experience together in the form of this awesome book so the readers can enjoy the exploration of the Amazing World of Python 3 Object Oriented Programming. The book covers the following topics,
- Classes and Objects
- Philosophy Behind Object Oriented Programming
- modules and packages
- Inheritance
- Static Methods, Abstract Classes, Final Classes
- Polymorphism
- Exception
- Built-in Data Structures
- Python Strings
- Iterators and Generators
The book will constantly be updated and we will add the new material based on the readers' precious feedback.
Table of Contents
- Acknowledgments
-
Preface
-
- Why am I writing this book?
- Who this book is for?
- How is this book organized?
- What this book is not?
-
About the Author
- Ashwin Pajankar
- Sushant Garg
- Errata and Suggestions
- How to Help the Author
-
-
1. Introduction
- 1.1 Objects and Classes
- 1.2 Everything is an Object in Python
- 1.3 Conclusion
-
2. Getting Started with Classes
- 2.1 Docstrings
- 2.2 Adding attributes to class
- 2.3 Adding a method to the class
- 2.4 Initializer method
- 2.5 Multiline Docstrings in Python
- 2.6 Conclusion
-
3. Modules and Packages
- 3.1 Modules
- 3.2 Packages
- 3.3 Conclusion
-
4. Inheritance
- 4.1 Basic Inheritance in Python
- 4.2 Method Overriding
-
4.3
super()
- 4.4 Conclusion
-
5. More Inheritance
- 5.1 Multiple Inheritance
- 5.2 Method Resolution order
- 5.3 The Diamond Problem
- 5.4 Abstract class and method
- 5.5 Access Modifiers in Python
- 5.6 Conclusion
-
6. Polymorphism
- 6.1 Method Overloading
- 6.2 Operator overloading
- 6.3 Conclusion
-
7. Exceptions
- 7.1 Syntax Errors
- 7.2 Exceptions
-
7.3 Handling exceptions
- 7.3.1 Handling exceptions by types
-
7.4
else
block - 7.5 Raising an exception
-
7.6
finally
clause - 7.7 User Defined Exceptions
- 7.8 Conclusion
- 7.9 Summary
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them