Skip to content

Python Programming Patterns

Best in textbook rentals since 2012!

ISBN-10: 0130409561

ISBN-13: 9780130409560

Edition: 2002

Authors: Thomas Christopher

List price: $44.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Python isn't just a tool for creating short Web scripts and simple prototypes: its advantages are equally compelling in large-scale development. In this book, Thomas Christopher shows developers the best ways to write large programs with Python, introducing powerful design patterns that deliver unprecedented levels of robustness, scalability, and reuse. Python Programming Patterns teaches both the Python programming language and how to "program in the large" in Python, using object-oriented techniques. Thomas Christopher demonstrates how to write Python code that leverages "programming-in-the-large" software structuring techniques, including modularization, toolkits, frameworks, abstract…    
Customers also bought

Book details

List price: $44.99
Copyright year: 2002
Publisher: Prentice Hall PTR
Publication date: 10/23/2001
Binding: Paperback
Pages: 560
Size: 6.75" wide x 9.00" long x 1.75" tall
Weight: 2.288
Language: English

Introduction
Acknowledgments
Getting Started
Why Write Larger Programs in Python? Running Python
Numbers
Lists, Strings, and Tuples
Logical Values
Dictionaries
Assignments
Garbage Collection
Operators
Wrap-Up
Statements
Python Statements
Example: Word Count
Wrap-Up
Exercises
Modules and Packages
Importing Modules
Importing Names from Modules
Avoiding Namespace Pollution
Reloading Modules
Search Paths
Packages
Example Stack Module
Critique of Modules
Wrap-Up
Exercises
Objects and Classes
Instances and Classes
Class Declarations
Instances
Methods
Single Inheritance
Visibility
Explicit Initializer Chaining
Example: Set Implementation
Critique
Example: BaseTimer
Inheritance As Classification
Multiple Inheritance
Recapitulation of the Scope of Names
Testing Objects and Classes
Wrap-Up
Exercises
Object-Oriented Patterns
Concept of Design Patterns
Creational Patterns
Structural Patterns
Behavioral Patterns
Wrap-Up
Exercises
Functions
Parameter and Argument Lists
Three-Level Scopes
Functional Programming
Function Objects
Built-In Functions
Wrap-Up
Exercises
Input/Output
File Objects
Execution Environment
Other Useful Modules
Wrap-Up
Exercises
Sequences
Common Sequence Operations
Tuples
Lists
Wrap-Up
Exercises
Strings
String Literals
Strings as Sequences
String Methods
Example: Splitter
String Formatting: The % Operator
Wrap-Up
Exercises
Dictionaries
Dictionary Operations
Example: Union-Find Algorithm
Persistence and Databases
Wrap-Up
Exercises
Exceptions
Exception Classes
Minimal Exception Handling
Examining the Exception
Raising Exceptions
Tracebacks
Re-Raising Exceptions
Raise with Strings
Try-Except-Else
The Try-Finally Statement
Wrap-Up
Exercises
Types
Type Objects
Members and Methods
Numbers, Strings, Tuples, Lists, and Dictionaries
Modules
User-Defined Functions
Code Objects
Classes
Class Instances
User-Defined Methods
Built-In Functions and Methods
Slice
Xrange
File
Frame
Traceback
Example: Scopes
Wrap-Up
Exercises
Programs and Run-Time Compilation
Python Interpreter Startup
Run-Time Compilation
Wrap-Up
Exercises
Abstract Data Types and Special Methods
Special Methods
Methods for All Objects
Operators
Arithmetic Operators
Augmented Assignment
Rich Comparisons
Attribute Access
Function Call Method
Wrap-Up
Exercises
Abstract Container Data Types
Special Methods for Container ADTs
DEQueue
Multidimensional Arrays
Class Versions of Built-In Data Types
Wrap-Up
Exercises
Priority Queues
Priority Queue Operations
Priority Queue Implementation
Unique Elements
Critique
Wrap-Up
Exercises
Sets
Set Operations
Implementation
PureSet: A Protection Proxy
SetEnumeration
Wrap-Up
Exercises
Concurrency
Threads
Race Conditions
Locks and Mutual Exclusion
Monitor Pattern
Producer-Consumer
Deadlock
Example: Future
Wrap-Up
Exercises
Transactions
Shared Database Operations
Example: Dining Philosophers
Implementation of SharedDB
Wrap-Up
Exercises
Run Queues
Simple RunQueue
Implementing RunQueue
Detecting Termination of an Object on the RunQueue
TransactionQueue
Example of TransactionQueue: Dining Philosophers
Wrap-Up
Exercises
Regular Expressions
Overall Behavior of re Module
re Syntax
Functions in re Module
Pattern Objects
Match Objects
Other Modes
Other Methods and Functions
Example: Scanner
Wrap-Up
Exercises
Parser
Overview of the Process
Implementing a Calculator
Building a Tree
Wrap-Up
Exercises
Wrap-Up
Contents
Software
Advice to the Reader
Appendix A
Index