Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Python Object-Oriented Programming
  • Table Of Contents Toc
Python Object-Oriented Programming

Python Object-Oriented Programming - Fourth Edition

By : Steven F. Lott, Dusty Phillips
3.9 (34)
close
close
Python Object-Oriented Programming

Python Object-Oriented Programming

3.9 (34)
By: Steven F. Lott, Dusty Phillips

Overview of this book

Python Object-Oriented Programming, Fourth Edition is a practical guide to advancing your OOP skills with modern Python. Going beyond the fundamentals, it helps you work with Python as an OOP language, explore both common and advanced design patterns, and apply these concepts to data manipulation and testing of complex OOP systems. Each chapter features newly written open-ended exercises as well as a real-world case study, aligned with the improvements in Python 3.11—bringing faster execution and memory efficiency to your applications. Authors Steven F. Lott and Dusty Phillips provide a comprehensive, illustrative tour of important OOP concepts, such as inheritance, composition, and polymorphism, showing how they integrate with Python’s classes and data structures to facilitate good design. The book also introduces two powerful automated testing systems, unittest and pytest, and explores Python's concurrent programming ecosystem in depth. By the end of the book, you’ll have a thorough understanding of how to think about and apply object-oriented principles using Python syntax to create robust and reliable programs.
Table of Contents (17 chapters)
close
close
15
Other Books You May Enjoy
16
Index

The Command pattern

When we think about class responsibilities, we can sometimes distinguish "passive" classes that hold objects and maintain an internal state, but don't initiate very much, and "active" classes that reach out into other objects to take action and do things. This is not a very crisp distinction, but it can help separate the relatively passive Observer and the more active Command design patterns. An Observer is notified that something changed. A Commander, on the other hand, will be active, making state changes in other objects. We can combine the two aspects, and that's one of the beauties of talking about a software architecture by describing the various patterns that apply to a class or a relationship among classes.

The Command pattern generally involves a hierarchy of classes that each do something. A Core class can create a command (or a sequence of commands) to carry out actions.

In a way, it's a kind of meta-programming...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Python Object-Oriented Programming
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon