Python Programming with Design Patterns (häftad)
Format
Häftad (Paperback)
Språk
Engelska
Antal sidor
352
Utgivningsdatum
2022-02-16
Upplaga
1
Förlag
Addison-Wesley Professional
Medarbetare
Cooper, James
Dimensioner
231 x 175 x 20 mm
Vikt
568 g
Antal komponenter
1
ISBN
9780137579938
Python Programming with Design Patterns (häftad)

Python Programming with Design Patterns

Häftad Engelska, 2022-02-16
349
  • Skickas inom 7-10 vardagar.
  • Gratis frakt inom Sverige över 199 kr för privatpersoner.
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
Visa hela texten

Passar bra ihop

  1. Python Programming with Design Patterns
  2. +
  3. HTML & CSS: Design and Build Web Sites

De som köpt den här boken har ofta också köpt HTML & CSS: Design and Build Web Sites av Jon Duckett (häftad).

Köp båda 2 för 598 kr

Kundrecensioner

Har du läst boken? Sätt ditt betyg »

Fler böcker av James W Cooper

Övrig information

James W. Cooper holds a PhD in chemistry and worked in academia, for the scientific instrument industry, and for IBM for 25 years, primarily as a computer scientist at IBM's Thomas J. Watson Research Center. Now retired, he is the author of 20 books, including 3 on design patterns in various languages. His most recent books are Flameout: The Rise and Fall of IBM Instruments (2019) and Food Myths Debunked (2014). James holds 11 patents and has written 60 columns for JavaPro Magazine. He has also written nearly 1,000 columns for the now vanished Examiner.com on foods and chemistry, and he currently writes his own blog: FoodScienceInstitute.com. Recently, he has written columns on Python for Medium.com and Substack. He is also involved in local theater groups and is the treasurer for Troupers Light Opera, where he performs regularly.

Innehållsförteckning

Preface xxi PART I: INTRODUCTION 1 The tkinter Library 2 GitHub 2 Chapter 1 Introduction to Objects 5 The Class __init__ Method 6 Variables Inside a Class 6 Collections of Classes 7 Inheritance 8 Derived Classes Created with Revised Methods 8 Multiple Inheritance 8 Drawing a Rectangle and a Square 10 Visibility of Variables 12 Properties 13 Local Variables 13 Types in Python 13 Summary 14 Programs on GitHub 15 Chapter 2 Visual Programming in Python 17 Importing Fewer Names 19 Creating an Object-Oriented Version 19 Using Message Boxes 21 Using File Dialogs 22 Understanding Options for the Pack Layout Manager 23 Using the ttk Libraries 24 Responding to User Input 25 Adding Two Numbers 26 Catching the Error 26 Applying Colors in tkinter 27 Creating Radio Buttons 27 Using a Class-Level Variable 30 Communicating Between Classes 30 Using the Grid Layout 30 Creating Checkbuttons 32 Disabling Check Boxes 32 Adding Menus to Windows 35 Using the LabelFrame 39 Moving On 40 Examples on GitHub 40 Chapter 3 Visual Programming of Tables of Data 41 Creating a Listbox 42 Displaying the State Data 44 Using a Combobox 46 The Treeview Widget 47 Inserting Tree Nodes 50 Moving On 51 Example Code on GitHub 51 Chapter 4 What Are Design Patterns? 53 Defining Design Patterns 54 The Learning Process 55 Notes on Object-Oriented Approaches 56 Python Design Patterns 57 References 57 PART II: CREATIONAL PATTERNS 59 Chapter 5 The Factory Pattern 61 How a Factory Works 61 Sample Code 62 The Two Subclasses 62 Building the Simple Factory 63 Using the Factory 63 A Simple GUI 64 Factory Patterns in Math Computation 65 Programs on GitHub 65 Thought Questions 66 Chapter 6 The Factory Method Pattern 67 The Swimmer Class 68 The Event Classes 69 Straight Seeding 70 Circle Seeding 71 Our Seeding Program 72 Other Factories 74 When to Use a Factory Method 74 Programs on GitHub 74 Chapter 7 The Abstract Factory Pattern 75 A GardenMaker Factory 75 How the User Interface Works 77 Consequences of the Abstract Factory Pattern 77 Thought Questions 78 Code on GitHub 78 Chapter 8 The Singleton Pattern 79 Throwing the Exception 80 Creating an Instance of the Class 80 Static Classes As Singleton Patterns 81 Finding the Singletons in a Large Program 81 Other Consequences of the Singleton Pattern 82 Sample Code on GitHub 82 Chapter 9 The Builder Pattern 83 An Investment Tracker 84 Calling the Builders 86 The List Box Builder 87 The Checkbox Builder 88 Displaying the Selected Securities 89 Consequences of the Builder Pattern 89 Thought Questions 89 Sample Code on GitHub 89 Chapter 10 The Prototype Pattern 91 Cloning in Python 91 Using the Prototype 92 Consequences of the Prototype Pattern 94 Sample Code on GitHub 94 Chapter 11 Summar