Book description
Improve Your Python Code with Modern Object-Oriented Design Patterns
To write clean, efficient, maintainable code, developers everywhere turn to design patterns. Now there’s a Python-specific patterns guide that’s friendly and practical enough for every Python developer, regardless of experience.
Best-selling patterns author James W. Cooper presents visual, example-driven explanations of 23 proven patterns for writing superior object-oriented code. Through clear and intuitive code samples, he introduces modern techniques for creating Python objects that interact effectively in powerful, flexible programs. Python newcomers--including those moving from other languages--will find a succinct introduction designed to get them up to speed fast.
Cooper’s wide-ranging patterns coverage addresses abstract classes, multiple inheritance, GUI programming and widgets, graphical classes, drawing and plotting, math, databases, Python decorators, images, threads, iterators, creating executable code, and more. Throughout, his informal visual presentation makes patterns far easier to work with--so you can confidently build sophisticated programs that use Python’s rich capabilities.
Review the essentials of Python objects and visual programming
Learn what design patterns are, and how they help you write better code
Use creational patterns to enhance flexibility and avoid unnecessary complexity
Apply structural patterns to ensure that program elements work together well in large programs
Optimize communication between objects with behavioral patterns
Table of contents
- Cover Page
- About This eBook
- Halftitle Page
- Title Page
- Copyright Page
- Pearson’s Commitment to Diversity, Equity, and Inclusion
- Dedication Page
- Contents at a Glance
- Table of Contents
- Preface
- Register Your Book
- Acknowledgments
- About the Author
-
Part I: Introduction
- The tkinter Library
- GitHub
- 1. Introduction to Objects
-
2. Visual Programming in Python
- Importing Fewer Names
- Creating an Object-Oriented Version
- Using Message Boxes
- Using File Dialogs
- Understanding Options for the Pack Layout Manager
- Using the ttk Libraries
- Responding to User Input
- Applying Colors in tkinter
- Creating Radio Buttons
- Communicating Between Classes
- Using the Grid Layout
- Creating Checkbuttons
- Adding Menus to Windows
- Using the LabelFrame
- Moving On
- Examples on GitHub
- 3. Visual Programming of Tables of Data
- 4. What Are Design Patterns?
- Part II: Creational Patterns
- Part III: Structural Patterns
- Part IV: Behavioral Patterns
-
Part V: A Brief Introduction to Python
-
31. Variables and Syntax in Python
- Data Types
- Numeric Constants
- Strings
- Character Constants
- Variables
- Complex Numbers
- Integer Division
- Multiple Equal Signs for Initialization
- A Simple Python Program
- Compiling and Running This Program
- Arithmetic Operators
- Combined Arithmetic and Assignment Statements
- Comparison Operators
- The input Statement
- PEP 8 Standards
- String Methods
- Examples on GitHub
- 32. Making Decisions in Python
- 33. Development Environments
- 34. Python Collections and Files
- 35. Functions
-
31. Variables and Syntax in Python
- Appendix A: Running Python Programs
- Index
- Code Snippets
Product information
- Title: Python Programming with Design Patterns
- Author(s):
- Release date: December 2021
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780137579921
You might also like
book
Python: Master the Art of Design Patterns
Ensure your code is sleek, efficient and elegant by mastering powerful Python design patterns About This …
book
Learning Python Design Patterns - Second Edition
Leverage the power of Python design patterns to solve real-world problems in software architecture and design …
book
Data Structures & Algorithms in Python
LEARN HOW TO USE DATA STRUCTURES IN WRITING HIGH PERFORMANCE PYTHON PROGRAMS AND ALGORITHMS This practical …
book
Python Object-Oriented Programming - Fourth Edition
A comprehensive guide to exploring modern Python through data structures, design patterns, and effective object-oriented techniques …