Python 3 Object Oriented Programming
Formats:

save 30%!
save 50%!

Also available on: |
![]() ![]() ![]() ![]() |
- Learn how to do Object Oriented Programming in Python using this step-by-step tutorial
- Design public interfaces using abstraction, encapsulation, and information hiding
- Turn your designs into working software by studying the Python syntax
- Raise, handle, define, and manipulate exceptions using special error objects
- Implement Object Oriented Programming in Python using practical examples
Book Details
Language : EnglishPaperback : 404 pages [ 235mm x 191mm ]
Release Date : July 2010
ISBN : 1849511268
ISBN 13 : 9781849511261
Author(s) : Dusty Phillips
Topics and Technologies : All Books, Open Source, Python
Table of Contents
Preface
Chapter 1: Object-oriented Design
Chapter 2: Objects in Python
Chapter 3: When Objects are Alike
Chapter 4: Expecting the Unexpected
Chapter 5: When to Use Object-oriented Programming
Chapter 6: Python Data Structures
Chapter 7: Python Object-oriented Shortcuts
Chapter 8: Python Design Patterns I
Chapter 9: Python Design Patterns II
Chapter 10: Files and Strings
Chapter 11: Testing Object-oriented Programs
Chapter 12: Common Python 3 Libraries
Index
Dusty Phillips
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 4 submitted: last submission 16 Oct 2012Errata type: Technical | Page number: 164 | Errata date: 08 Dec 10
The text says that the methods keys(), values(), and items() return iterator values; when in reality they return lists. Reference
Errata type: Typo | Page number: 17 | Errata date: 17 Jan 11
"This is a common first example of composition, bit it's not a very good one when it comes to designing computer systems."
Should actually be:
"This is a common first example of composition, but it's not a very good one when it comes to designing computer systems."
Errata type: Code | Page numbers: 51
print(secret_string.__plain_text) should be:
print(secret_string.__plain_string)
Errata type: Technical | Page number: 145
Replace "** means squared" with "**2 means squared"
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Implement objects in Python by creating classes and defining methods
- Separate different objects into a taxonomy of classes, and describe the properties and behaviors of those objects via the class interface
- Design public interfaces using abstraction, encapsulation, and information hiding
- Turn your designs into working software by learning the Python syntax
- Share implementation using inheritance
- Add functionality to the existing classes and built-ins using inheritance
- Share similar code between classes by abstracting it into a parent class
- Raise, handle, define, and manipulate exceptions using special error objects
- Understand when to use object-oriented features, and more importantly when not to
- Learn what design patterns are, and why they are different in Python
- Uncover the simplicity of unit testing and why it's so important in Python
- Utilize common Python 3 modules, libraries, and frameworks
Object Oriented Programming is a very important aspect of modern programming languages. The basic principles of Object Oriented Programming are relatively easy to learn. Putting them together into working designs can be challenging.
This book makes programming more of a pleasure than a chore using powerful Python 3 object-oriented features of Python 3. It clearly demonstrates the core OOP principles and how to correctly implement OOP in Python.
Object Oriented Programming ranks high in importance among the many models Python supports. Yet, many programmers never bother learning the powerful features that make this language object oriented.
The book teaches when and how OOP should be correctly applied. It emphasizes not only the simple syntax of OOP in Python, but also how to combine these objects into well-designed software.
This book will introduce you to the terminology of the object-oriented paradigm, focusing on object-oriented design with step-by-step examples. It will take you from simple inheritance, one of the most useful tools in the object-oriented programmer's toolbox, all the way through to cooperative inheritance, one of the most complicated. You will be able to raise, handle, define, and manipulate exceptions.
You will be able to integrate the object-oriented and the not-so-object-oriented aspects of Python. You will also be able to create maintainable applications by studying higher level design patterns. You'll learn the complexities of string and file manipulation, and how Python distinguishes between binary and textual data. Not one, but two very powerful automated testing systems will be introduced to you. You'll understand the joy of unit testing and just how easy they are to create. You'll even study higher level libraries such as database connectors and GUI toolkits and how they apply object-oriented principles.
Harness the power of Python 3 objects; it's not just a scripting language
The book begins with the very foundations of OOP and then uses practical examples to show how to correctly implement Object Oriented Programming in Python. Many examples are taken from real-world projects. The book focuses on high-level design as well as the gritty details of the Python syntax. The provided exercises inspire the reader to think about his or her own code, rather than providing solved problems.
If you're new to Object Oriented Programming techniques, or if you have basic Python skills and wish to learn in depth how and when to correctly apply Object Oriented Programming in Python, this is the book for you.
If you are an object-oriented programmer for other languages, you too will find this book a useful introduction to Python, as it uses terminology you are already familiar with.
Python 2 programmers seeking a leg up in the new world of Python 3 will also find the book beneficial, and you need not necessarily know Python 2.