Buy new:
$33.98$33.98
Arrives:
May 18 - 30
Ships from: Amazon Sold by: NorthAmericaTrades
Buy used: $7.77
Other Sellers on Amazon
+ $11.09 shipping
98% positive over last 12 months
+ $11.09 shipping
100% positive over last 12 months
+ $11.09 shipping
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required. Learn more
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) 1st Edition
| Price | New from | Used from |
- Kindle
$23.99 Read with Our Free App - Paperback
$7.77 - $33.9829 Used from $3.74 6 New from $29.89
There is a newer edition of this item:
Purchase options and add-ons
Through realistic examples, Slatkin uncovers little-known Python quirks, intricacies, and idioms that powerfully impact code behavior and performance. You'll learn how to choose the most efficient and effective way to accomplish key tasks when multiple options exist, and how to write code that's easier to understand, maintain, and improve.
Drawing on his deep understanding of Python's capabilities, Slatkin offers practical advice for each major area of development with both Python 3.x and Python 2.x. Coverage includes:
- Algorithms
- Objects
- Concurrency
- Collaboration
- Built-in modules
- Production techniques
- And more
- ISBN-109780134034287
- ISBN-13978-0134034287
- Edition1st
- PublisherAddison-Wesley Professional
- Publication dateFebruary 26, 2015
- LanguageEnglish
- Dimensions9 x 7 x 0.5 inches
- Print length256 pages
Effective Ruby: 48 Specific Ways to Write Better Ruby (Effective Software Development)
1 or more items shipped or sold by sellers other than Amazon.com
Frequently bought together

- +
- +
Products related to this item
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 | |
| 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
Review
“I’ve been programming in Python for years and thought I knew it pretty well. Thanks to this treasure trove of tips and techniques, I realize there’s so much more I could be doing with my Python code to make it faster (e.g., using built-in data structures), easier to read (e.g., enforcing keyword-only arguments), and much more Pythonic (e.g., using zip to iterate over lists in parallel).”
–Pamela Fox, educationeer, Khan Academy
“If I had this book when I first switched from Java to Python, it would have saved me many months of repeated code rewrites, which happened each time I realized I was doing particular things ‘non-Pythonically.’ This book collects the vast majority of basic Python ‘must-knows’ into one place, eliminating the need to stumble upon them one-by-one over the course of months or years. The scope of the book is impressive, starting with the importance of PEP8 as well as that of major Python idioms, then reaching through function, method and class design, effective standard library use, quality API design, testing, and performance measurement–this book really has it all. A fantastic introduction to what it really means to be a Python programmer for both the novice and the experienced developer.”
–Mike Bayer, creator of SQLAlchemy
“Effective Python will take your Python skills to the next level with clear guidelines for improving Python code style and function.”
–Leah Culver, developer advocate, Dropbox
“This book is an exceptionally great resource for seasoned developers in other languages who are looking to quickly pick up Python and move beyond the basic language constructs into more Pythonic code. The organization of the book is clear, concise, and easy to digest, and each item and chapter can stand on its own as a meditation on a particular topic. The book covers the breadth of language constructs in pure Python without confusing the reader with the complexities of the broader Python ecosystem. For more seasoned developers the book provides in-depth examples of language constructs they may not have previously encountered, and provides examples of less commonly used language features. It is clear that the author is exceptionally facile with Python, and he uses his professional experience to alert the reader to common subtle bugs and common failure modes. Furthermore, the book does an excellent job of pointing out subtleties between Python 2.X and Python 3.X and could serve as a refresher course as one transitions between variants of Python.”
–Katherine Scott, software lead, Tempo Automation
“This is a great book for both novice and experienced programmers. The code examples and explanations are well thought out and explained concisely and thoroughly.”
–C. Titus Brown, associate professor, UC Davis
“This is an immensely useful resource for advanced Python usage and building cleaner, more maintainable software. Anyone looking to take their Python skills to the next level would benefit from putting the book’s advice into practice.”
–Wes McKinney, creator of pandas; author of Python for Data Analysis; and software engineer at Cloudera
About the Author
Product details
- ASIN : 0134034287
- Publisher : Addison-Wesley Professional; 1st edition (February 26, 2015)
- Language : English
- Paperback : 256 pages
- ISBN-10 : 9780134034287
- ISBN-13 : 978-0134034287
- Item Weight : 15.5 ounces
- Dimensions : 9 x 7 x 0.5 inches
- Best Sellers Rank: #896,406 in Books (See Top 100 in Books)
- #648 in Computer Programming Languages
- #966 in Python Programming
- Customer Reviews:
About the author

Brett Slatkin is a Principal software engineer at Google where he works in the Office of the CTO. He's been at Google for 16 years. He was the founder of Google Surveys, a platform for collecting market research and machine learning datasets. He led Google Optimize and a variety of A/B experimenting systems for Google Ads. He also built and launched Google's first Cloud computing product (App Engine). Brett is the author of the book Effective Python. He was also the co-creator of the W3C standard for real-time RSS (PubSubHubbub). He earned his B.S. in Computer Engineering from Columbia University in the City of New York.
Products related to this item
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 AmazonReviewed in the United States on May 22, 2019
-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
One aspect I appreciated was how the author shows a naive implementation of a common solution. This is often a solution most people would think of, and these naive solutions looked correct at first glance. The author then shows where the naive solution fails, why it fails, and a way to do it better.
I particularly liked Item 37 which discussed threads in Python. It describes the CPython implementation and the GIL (global interpreter lock) in a way I have not seen before. It was a clear description and informative.
The chapters have a good range in difficulty from easy to challenging. For example, Item 2 is a recommendation to use PEP 8 as a style guide. This chapter will be easily accessible to anyone. However, Chapter 4 about Metaclasses and Attributes was extremely challenging for me.
Each sentence is well written and packed with information. Side notes are provided when needed and these were also useful. The coloring of the book is nice, as it looks like an interactive development environment to show which keywords are highlighted. The examples provided in the Items are relevant to current programming practices.
The examples are clear. They are not some 'dry' Class X, method Y sort of examples, they tend to use examples that better illustrate the scenario; so if you at first don't get the author's explanation, you might see what's going on because of the connotations that come with sensible examples.
The formatting and layout are fairly good, especially with syntax highlighting code. There are few goofy spots where text talks about code that's displayed on the next page, so to relate one to the other you need to flip pages back'n'forth, and some tables/boxes spill over to the next page for like two lines. But that's just minor nit-picking.
My biggest 'complaint' is about what's NOT in the book. There is only a slight mention of itertools, or any functional programming concepts, that are so neatly baked into Python. There is also very slim amount of information on testing, which I would like to read more about, as it's become very commonplace. I would love to see a second edition of this book with extended sections on the aforementioned topics.
There's lots of cool tricks to learn. The chapters are short enough where you can just sit down for 15 minutes and knock one out. This is great for me when I just want to read a little before bed, but I've also sat down and read the book for a few hours at a time. I've had no problems with the Kindle version. Although you can skip around in the book, I recommend a front to back read, as some of the concepts build on each other.
I'll give book 5 stars for now and change it later if my experience warrants otherwise.
2015.03.20 : Update
What I have read I thoroughly enjoyed.
I'm not as gifted nor eloquent as Fred Jonsson. Fred did a superb job summarizing and describing the book and all I can add to that is I agree with everything he has said thus far.
I opted for kindle version because it was available now and I like portability, access anywhere on any device and ability to search.
It's very easy to read, follow along and information is immediately practical, beneficial and useful.
What one gains or experience is highly subjective and personal.
I like book. I'm learning. It's exceeding my expectations thus far. Highly recommend it.
If you haven't already done so, read Fred Jonsson's review and the Book's Description on main page. Based on what I've read in book thus far, everything they've shared is accurate.
Top reviews from other countries
Each one of the recipes explains the issue, discusses one or more solutions, with examples and discussion of tradeoffs, and concludes with a short list of the things to remember. The discussion of various tradeoffs gives great insight into the underlying issues, and the examples are well chosen and very useful.
Even if you follow only a few of the recipes, you will find they make your Python coding more effective. If you follow all 59, your code should fairly fly! Highly recommended.
Although it is not suitable for a beginner anyone with a reasonable working knowledge of the language who wants to programme well would benefit considerably from it. Most of the material in the first third of the book will be relevant to all python programmers and could help them develop a good style before habits set in.
As the book progresses, the topics become more advanced with a lot of detail on metaclasses, concurrency and parallelism, virtual environments and collaboration, which I wasn't so interested in but it was still worth buying just for the first half.



