
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Python in Practice: Create Better Programs Using Concurrency, Libraries, and Patterns (Developer's Library) 1st Edition
Winner of the 2014 Jolt Award for "Best Book"
“Whether you are an experienced programmer or are starting your career, Python in Practice is full of valuable advice and example to help you improve your craft by thinking about problems from different perspectives, introducing tools, and detailing techniques to create more effective solutions.”
—Doug Hellmann, Senior Developer, DreamHost
If you’re an experienced Python programmer, Python in Practice will help you improve the quality, reliability, speed, maintainability, and usability of all your Python programs.
Mark Summerfield focuses on four key themes: design patterns for coding elegance, faster processing through concurrency and compiled Python (Cython), high-level networking, and graphics. He identifies well-proven design patterns that are useful in Python, illuminates them with expert-quality code, and explains why some object-oriented design patterns are irrelevant to Python. He also explodes several counterproductive myths about Python programming—showing, for example, how Python can take full advantage of multicore hardware.
All examples, including three complete case studies, have been tested with Python 3.3 (and, where possible, Python 3.2 and 3.1) and crafted to maintain compatibility with future Python 3.x versions. All code has been tested on Linux, and most code has also been tested on OS X and Windows. All code may be downloaded at www.qtrac.eu/pipbook.html.
Coverage includes
- Leveraging Python’s most effective creational, structural, and behavioral design patterns
- Supporting concurrency with Python’s multiprocessing, threading, and concurrent.futures modules
- Avoiding concurrency problems using thread-safe queues and futures rather than fragile locks
- Simplifying networking with high-level modules, including xmlrpclib and RPyC
- Accelerating Python code with Cython, C-based Python modules, profiling, and other techniques
- Creating modern-looking GUI applications with Tkinter
- Leveraging today’s powerful graphics hardware via the OpenGL API using pyglet and PyOpenGL
- ISBN-100321905636
- ISBN-13978-0321905635
- Edition1st
- PublisherAddison-Wesley Professional
- Publication dateAugust 29, 2013
- LanguageEnglish
- Dimensions7 x 0.75 x 9 inches
- Print length306 pages
Frequently purchased items with fast delivery
From the Publisher
![]()
59 Specific Ways to Write Better Python
|
![]()
5+ Hours of Video Instruction
|
![]()
Definitive Reference Guide
|
![]()
Master the Powerful Python 3 Standard Library through Real Code Examples
|
![]()
8+ Hours of Video Instruction
|
|
---|---|---|---|---|---|
Add to Cart
|
Add to Cart
|
Add to Cart
|
|||
Customer Reviews |
4.6 out of 5 stars 380
|
— |
4.3 out of 5 stars 225
|
4.5 out of 5 stars 130
|
— |
Price | $24.95$24.95 | — no data | $42.20$42.20 | $80.68$80.68 | — no data |
Title | Effective Python | Effective Python LiveLessons | Python Essential Reference | The Python Standard Library by Example | Modern Python LiveLessons: Big Ideas and Little Code in Python |
Author | Brett Slatkin | Brett Slatkin | David Beazley | Doug Hellmann | Raymond Hettinger |
User Experience Level | Intermediate and advanced level Python programmers | Intermediate and advanced level Python programmers | Assumes that the reader has prior programming experience with Python or another language such as C or Java | Intermediate-level Python programmers | Intermediate-level Python programmers |
What You Will Learn | How to harness Python’s full power to write exceptionally robust and well-performing code. | The Pythonic way of writing programs, building on a fundamental understanding of Python to help you write programs more effectively. | The core Python language, and the most essential parts of the Python library. | How to utilize the Python 3.x library to jump-start application development. | How to elegantly code powerful solutions succinctly and efficiently with Python. |
Core Concept | Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, and shortcuts, and explains them with realistic code examples. | Hands-on demonstration of a broad but related set of items designed to provide concise and specific guidance on what to do and what to avoid when writing programs using Python. | Accurate and concise reference to the most important parts of Python. | Presents selected examples from the hundereds of modules in the Python standard linrary demonstrating how to use the most commonly used features of the modules that support Python’s 'batteries included' slogan. | Provides developers with an approach to programming in Python that expresses big ideas succinctly, with the minimum of code, allowing the business logic to shine through. |
Key Topics Covered | Best practices for writing functions that clarify intention, promote reuse, and avoid bugs; Expressing behaviors with classes and objects; Avoid pitfalls with metaclasses and dynamic attributes; Efficient approaches to concurrency and parallelism; Techniques and idioms for using Python’s built-in modules; Tools and best practices for collaborative development | Methods; Comprehensions and generators; Functions and classes; Concurrency and parallelism; How to make programs more robust | Language features, libraries, and modules; Generators, coroutines, closures, metaclasses, and decorators; How to use Python 2.6’s forward compatibility mode to evaluate code for Python 3 compatibility; Low-level system and networking library modules | Python 3.x’s new libraries, significant functionality changes, and new layout and naming conventions. Expert porting guidance for moving code from 2.x Python standard library modules to their Python 3.x equivalents. | Newer features from Python 3.6, including f-strings and type hinting; ETL (extract-transform-load) techniques to prepare real-world data for analysis; How to improve code reliability |
Python Versions Covered | 3.x and 2.x | Python 3 | Python 2.6 and 3.0. Omits features of Python 2 that have been removed from Python 3. Does not features of Python 3 that have not been back-ported. | Python 3 In an effort to maintain clear and concise descriptions for each example, the differences between Python 2 and 3 are not highlighted in each chapter. | Python 3.6 |
Editorial Reviews
From the Author
"Mark Summerfield's Python in Practice is a fascinating book intended for intermediate and advanced Python developers. Rather than being a primer, it attacks advanced issues in Python -- the ones that go beyond bread-and-butter programming. It imparts the skills that distinguish the expert from the journeyman. In other words, if you're a decent, but not yet great Python programmer, this is book is for you."
...
"Overall, the book has the right mix of high-level concepts, low-level details, and code samples. Its pragmatic treatment of useful topics, lucid explanations, succinct code, and careful attention to presentation make it an excellent book for intermediate to advanced Python developers and the Jolt Award winner for 2014."
About the Author
Product details
- Publisher : Addison-Wesley Professional
- Publication date : August 29, 2013
- Edition : 1st
- Language : English
- Print length : 306 pages
- ISBN-10 : 0321905636
- ISBN-13 : 978-0321905635
- Item Weight : 1.15 pounds
- Dimensions : 7 x 0.75 x 9 inches
- Part of series : Game Design
- Best Sellers Rank: #3,752,332 in Books (See Top 100 in Books)
- #2,902 in Python Programming
- #3,840 in Computer Programming Languages
- Customer Reviews:
About the author

Mark Summerfield is a computer science graduate and qualified teacher with many years experience working in the software industry, primarily as a programmer and documenter. Mark owns Qtrac Ltd., http://www.qtrac.eu, where he works as a programmer and where he created and now maintains his commercial software --- PDF comparison tools DiffPDF (GUI) and comparepdfcmd (command line). He also created the open source UXF (Uniform eXchange Format), and wrote the first UXF libraries.
All Mark's books are aimed at programmers and others, such as students, scientists, and engineers, who already have some programming experience (how much depends on the individual book). Each solo book has its own page on the Qtrac website from which the source code can be downloaded and that lists the book's errata. All the books are designed to teach technologies that Mark loves and has found to be the best of their kind.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on December 1, 2013Anything less than a 5-star review does this work, and it's author, an injustice, IMHO. It's awesome.
Clearly this book is intended for the experienced Python developer - and I think it's entirely safe to say that, regardless of your current Python expertise, you will learn a lot from this book. Some of the topics related to concurrency (for example) answered a lot of nagging doubts that I've always had about Python and how (or even if) it can be leveraged in todays (many) multi-core systems. Mark (Summerfield) presents this topic in a way that makes total sense - and you feel like a new chapter (no pun intended) has been opened to you, in terms of advanced uses of Python. Certainly there are techniques I had never come across before - and yet - Mark presents them in such a confidence inspiring way that makes you wonder why you have not come across them before. He makes it seem like it's entirely obvious. Well... it is .. but only after you've read about them in this book!!
The exclusive use of Python 3.n threw me a curve ball. That I didn't expect - and there are no "in Python 2.n" type hints. While this first seemed like a road-block, it turns out to be something else, Python related, that I had been putting off - waiting for some magic "road sign" to appear to tell me to start writing Python 3. This book forces you to deal with this issue - and is yet another skillset stretch - that can only be of long-term benefit to any Python developer.
Bottom line: If you think you know Python - get this book and spend the time working your way through it. It's a skill set builder and worth every $0.01 of the price.
Well done Mark S. Very Highly Recommended.
- Reviewed in the United States on January 27, 2014Just a word that familiarity with python, and perhaps a love of it, are a must. This is an interesting work, but you have to quite actively using the language presently and-or have a solid ongoing relationship with it to get much out of the book. That said, if you do, it's excellent, and full of good example syntax and hands-on patterns.
- Reviewed in the United States on May 23, 2017Useful info, well written. One of the best books I've seen about Python 3. It goes beyond the language itself, covering several useful libraries and mentions the possibility of extending Python with C routines that support python calls. Also, it's possible to embed a Python interpreter in a C or C++ program, to give it script executing features. Makes clear that there is always more to learn about Python and the libraries available for it.
- Reviewed in the United States on July 5, 2014A great addition to the shelf of the intermediate-to-advanced Python programmer. And at ~300 pages, it's a nicely-paced front-to-back read.
Some of the patterns expressed are complex, so I would recommend downloading the accompanying code examples and saving those out as a project in your text editor so you can flip through them. Summerfield takes the strategy of implementing a "naive" example and then progressively enhancing it with features from Python 3. Having a project laid out with each of these examples side by side will help the reader's understanding greatly.
Note: I bought the Kindle edition (in Spring 2014) of this book first, and was really disappointed. Like many 'technical' books with a lot of images (and even code snippets are rendered as images), the Kindle rendering of images left a lot to be desired on the Android Kindle app. Navigation is harder than a real book, and the images were low-res. Still, I liked the explanations so much I just had to have the paperback edition, which warrants 4 stars.
- Reviewed in the United States on July 5, 2015This is a great book, you can learn a lot of skills from this book.
But to read this book you have better prepare a clear mind otherwise you will easily get lost in this book.
Because the author used lot of words illustrating the example. And you need a lot of mind efforts to understand his examples because those examples are not easy. Those are totally waste of your time if your purpose is to learn something.
So if you want to learn something from this book, my suggestions are:
1. Choose the chapter that you have the interest.
2. skip all the words, go straight toward the codes.
3. don't try to understand the codes, just pick up how the skills/ideas are used in those codes.
4. if you don't get a very concrete idea, go back to the descriptions and pick up what you need, don't read throughly.
- Reviewed in the United States on October 3, 2021unexpected.
- Reviewed in the United States on January 21, 2014I was mainly interested in the Design Patterns section out of the four main sections. First, what I liked about the book: It was very easy to read and understand. The section on design patterns is a good introduction to design patterns especially for python developers. The code examples compare the classic implementation of a pattern as well as the "Pythonic way " of doing it which I thought was valuable. Good explanation of why some patterns from the Gang of Four are irrelevant in python. Good refresher for folks who have been using design patterns in their code for a while. Now for some constructive feedback for the next edition: More detailed treatment of the patterns themselves. For instance discussing use cases of a given pattern, the nuances of it's implementation in Python as compared to another language like Java. It would be nice to have a section dedicated to anti patterns.
- Reviewed in the United States on September 29, 2013The importance of the topics presented in this book exceed the immediate practicality of design patterns. It really shows a different approach in generic software development. How can one write programs with maximum reusability and extensibility.
Top reviews from other countries
- KiranReviewed in the United Kingdom on May 13, 2022
4.0 out of 5 stars Good book
Good book for python language
I don't consider as a advanced book.
May be beginner to intermediate
-
Roland K.Reviewed in France on September 6, 2015
4.0 out of 5 stars Le top de la programmation Python
Absolument passionnant, à réserver cependant aux programmeurs ayant déjà une certaine expérience du langage Python. Je me suis empressé d'appliquer les solutions présentées à mes travaux en cours, à ma grande satisfaction.
- Adel zalokReviewed in Germany on May 21, 2014
3.0 out of 5 stars No Flow for understanding
The book provides patterns as independent pieces, I could not follow up as a reader so easily. The flow is missing. Furthermore, the writer digs directly into details without reasoning behind the "Why" which I find really critical.
- David ThomasReviewed in Canada on November 17, 2015
4.0 out of 5 stars Intermediate Level Python Programming
It is for an intermediate level Python programmer ... I would not recommend to Python newbie's. My interests were primarily in the sections on design patterns and concurrency. Good perspectives in these areas ... great additions to my toolbox.
- ScholliiReviewed in Canada on January 27, 2015
3.0 out of 5 stars Three Stars
Doesn't discuss alternative approaches or pros/cons of a solution. Rather superficial.