Buy new:
-71% $11.60$11.60
$4.99 delivery February 24 - 25
Ships from: MidwestMixedMedia Sold by: MidwestMixedMedia
Save with Used - Good
$9.20$9.20
Ships from: Amazon Sold by: Relaxing Shop
![Kindle app logo image](https://m.media-amazon.com/images/G/01/kindle/app/kindle-app-logo._CB668847749_.png)
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.
Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) 1st Edition
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
Frequently bought together
![Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series)](https://images-na.ssl-images-amazon.com/images/I/81+g5+5nmWL._AC_UL116_SR116,116_.jpg)
Customers who viewed this item also viewed
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
|
|
---|---|---|---|---|---|
Customer Reviews |
4.6 out of 5 stars
381
|
— |
4.3 out of 5 stars
224
|
4.5 out of 5 stars
131
|
— |
Price | $11.60$11.60 | — | $28.05$28.05 | $45.05$45.05 | — |
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 : 1.06 pounds
- Dimensions : 9 x 7 x 0.5 inches
- Best Sellers Rank: #758,770 in Books (See Top 100 in Books)
- #532 in Computer Programming Languages
- #811 in Python Programming
- Customer Reviews:
About the author
![Brett Slatkin](https://m.media-amazon.com/images/S/amzn-author-media-prod/eqag9qohhi055ruu44t9n20pl0._SY600_.jpg)
Brett Slatkin is the author of the book Effective Python and has been writing Python code professionally for the past 19 years. He works as a principal software engineer in the Office of the CTO at Google developing technology strategies and rapid prototypes. His experience includes: founding Google Surveys, a platform for collecting machine learning and market research datasets; launching Google App Engine, the company's first cloud computing product; scaling Google's A/B experimentation products to billions of users; and co-creating PubSubHubbub, the W3C standard for real-time RSS feeds. He earned his B.S. in Computer Engineering from Columbia University in the City of New York.
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 AmazonCustomers say
Customers find the book provides useful knowledge and practical tips for Python developers. They appreciate the clear examples and explanations presented in a straightforward way. The book is described as a quick, easy read with pleasant fonts and layout. However, opinions differ on whether it's worth the money or not.
AI-generated from the text of customer reviews
Customers find this book provides useful knowledge and tips for writing concise and elegant code. They find it practical and useful even for experienced Python developers. The ideas start out helpful and accessible, but then get more esoteric. However, the techniques taught allow you to write good "pythonic" code. The book helps new coders improve their code and is effective at helping people step up their Python game.
"...It was a clear description and informative. The chapters have a good range in difficulty from easy to challenging...." Read more
"Very good book. Starts with basics, but it quickly goes into 'magic' territory, so whether you're a veteran or just wanting to see what's special..." Read more
"Straight to the point, concise and all organized. Helped to get me going in Python. Recommend it your age serious about Python." Read more
"...about half way through the book I've already learned a lot of really cool tricks that I've actually applied in my own programs since...." Read more
Customers find the book concise and organized. They appreciate the clear examples and explanations. The formatting and layout are good, especially with syntax highlighting code. The book is simple and perfect for highlighting nuanced aspects of the language. It provides useful information, even for experienced Python users.
"...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...." Read more
"...The formatting and layout are fairly good, especially with syntax highlighting code...." Read more
"Straight to the point, concise and all organized. Helped to get me going in Python. Recommend it your age serious about Python." Read more
"...This book is more about the philosophy of good code design and scalability than it is a workbook to accomplish specific tasks, so don't expect to..." Read more
Customers find the book easy to read and follow. They appreciate the concise code and nice formatting. The chapters are short enough to allow for quick reading sessions. Readers also mention that the book is practical and can be flipped through in any order.
"...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..." Read more
"...It's very easy to read, follow along and information is immediately practical, beneficial and useful...." Read more
"...This book is very practical and you can skip around in no particular order and there are concise code examples to demonstrate the ideas contained in..." Read more
"...useful, but it's presented in a manner (fonts/layout) that is pleasant to read. I would recommend inclusion in any Python programmer's bookshelf." Read more
Customers have different views on the book's value. Some find it worthwhile and say upgrading to Python 3 is a good investment for their codebase, while others consider it a waste of money and just a collection of useful rules-of-thumb.
"...what convinced me the time to upgrade to python3 would be worth investing for my codebase, for, among other things, collections.abc...." Read more
"This is not a very good book - it's just a collection of useful rules-of-thumb with a slight attempt to justify why the rule should be followed...." Read more
"Absolutely worth the money." Read more
"This was a waste of money on the Kindle. Don’t even bother, move on. None of the code downloads with the book. Just skip this crap." Read more
Reviews with images
![This is the book to bring your Python skill to the next level](https://images-na.ssl-images-amazon.com/images/G/01/x-locale/common/transparent-pixel._V192234675_.gif)
This is the book to bring your Python skill to the next level
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on April 22, 2016I thought I knew Python pretty well before reading this book, but I discovered I have a lot to learn. What this book shows is how to improve your Python code in specific and clear ways.
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.
- Reviewed in the United States on April 7, 2015Very good book. Starts with basics, but it quickly goes into 'magic' territory, so whether you're a veteran or just wanting to see what's special about Python, you will find some new approaches.
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.
- Reviewed in the United States on April 9, 2023Straight to the point, concise and all organized. Helped to get me going in Python. Recommend it your age serious about Python.
- Reviewed in the United States on March 4, 2019Although I'm only about half way through the book I've already learned a lot of really cool tricks that I've actually applied in my own programs since. (I hate learning tricks that aren't that useful in practical use cases) So far, I especially enjoyed the sections about list comprehension and generators. Generators were completely new to me and I was amazed at how useful they are for large data sets!
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.
- Reviewed in the United States on March 12, 2015Guess I'm the first person to purchase this book ( kindle edition ) on Amazon. I bought this book because of Fred Jonsson's great review.
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.
- Reviewed in the United States on June 25, 2018I'm really enjoying this book as an intermediate python programmer looking to learn more "pythonic" ways of doing things and taking advantage of the full standard library and more performant practices. This book is very practical and you can skip around in no particular order and there are concise code examples to demonstrate the ideas contained in each tip. This book is more about the philosophy of good code design and scalability than it is a workbook to accomplish specific tasks, so don't expect to read it and code along and make really interesting projects. Instead, think of this book as a set of best practices to make your code more easily debugged, easier to read, easier for other people to use, and hopefully have better performance as well.
- Reviewed in the United States on November 23, 2015excellent summary of some python features that make the language different than many others. Definitely a good read if you're looking to become a better python programmer or to understand a little more about some unique features (e.g metaclasses, decorators). I wish it had given a little more credit to or mention some 3P libraries if nothing else as a pointer to tell the reader what to read about next (e.g. requests, boto, pytest, matplotlib) just to mention a few areas.
Top reviews from other countries
-
CristianReviewed in Mexico on August 19, 2023
5.0 out of 5 stars Contenido excelente
Es un excelente libro para mejorar tu código en Python, ayuda a aprovechar las ventajas de usar python. Recomendaría ir por este como segundo libro y como primer libro: python crash course y ya por último para tener un nivel profesional: fluent python. Son los tres mejores libros que yo he leído.
Lamentablemente la calidad no es tan buena, yo iría por la versión electrónica.
-
MaxReviewed in Germany on July 16, 2019
5.0 out of 5 stars Der Titel hält was er verspricht!
Effective Python! Ein sehr informatives Buch, auf relativ wenig Seiten. Ich bin außerordentlich zufrieden damit. Als nicht Profi, aber auch nicht Amateur war das Buch einleuchtend für mich. Ich hab viele Fehler erkannt die ich selber gemacht habe, aber dank den bespielen und Erklärungen kann man sich an die 'Pythonic ways' schnell anpassen! Ich hab das Buch immer noch nicht komplett durch aber meiner Meinung nach war es jeden Cent und noch mehr Wert!
- Susan StepneyReviewed in the United Kingdom on January 1, 2019
5.0 out of 5 stars This excellent little book will make you a better Python programmer in many ways
This excellent little book will make you a better Python programmer in many ways. It comprises 59 different recipes of how to use Python more effectively. These range from programming in the small – such as using slicing, list comprehensions, generators, enumerate, zip – to progressively larger issues – such as exceptions, keyword arguments, custom containers – then on to trickier concepts – such as metaclasses, threads, coroutines, built-in modules – to programming in the large – such as reliable pickling, docstrings, packages, unit testing, profiling, and finding memory leaks.
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.
- Pradeep KumarReviewed in India on September 23, 2017
5.0 out of 5 stars Great book
Finally finished this book, It is an awesome, every item provided is a nugget, some of them are easy, some of them are very interesting and some of them are very hard. The book has it all, Must read for everyone who love python.
- Young Chul SimReviewed in Australia on August 26, 2019
5.0 out of 5 stars Well written Intro to experienced programmers
very plane but thoughtful explanation.
It is very important to start new language knowing key aspect of the language not being fall in to fit of too much detail.
It is also good to be able to focus on one material before surfing web pages...