Buy new:
-71% $11.60
$4.99 delivery February 24 - 25
Ships from: MidwestMixedMedia
Sold by: MidwestMixedMedia
$11.60 with 71 percent savings
List Price: $39.99
$4.99 delivery February 24 - 25. Details
Only 1 left in stock - order soon.
$$11.60 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$11.60
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
MidwestMixedMedia
MidwestMixedMedia
Ships from
MidwestMixedMedia
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt. You may receive a partial or no refund on used, damaged or materially different returns.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$9.20
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Saturday, February 15 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Thursday, February 13. Order within 18 hrs 55 mins.
Only 1 left in stock - order soon.
$$11.60 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$11.60
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Kindle app logo image

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.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) 1st Edition

4.6 4.6 out of 5 stars 381 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$11.60","priceAmount":11.60,"currencySymbol":"$","integerValue":"11","decimalSeparator":".","fractionalValue":"60","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"CkSC3Y%2BjARd1EYVFkmPmN4T7%2FLut2cN9IUiei3KeJM2hroCrunbfRJDJvqfew2HXtrqIvdVeAFLFLPD2CJ8wXhXHnPEi0RXidUWtQnF0SjdAsTnzYT61T4AziXJLGZlt16qdNb2oa0XxzPg9L33%2Few%2BAnnX%2F2gsIUtuWBeILpsnmL5oivzjuqYiTRlV1Bzjo","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$9.20","priceAmount":9.20,"currencySymbol":"$","integerValue":"9","decimalSeparator":".","fractionalValue":"20","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"CkSC3Y%2BjARd1EYVFkmPmN4T7%2FLut2cN9gIZnfcjPN%2B03w%2FqEytPu3rGCGB54N99kGB4vOdkubmOoU69ELH2GxU1otxq7NXB9IE4xsvGT1qbDT4SdoPatHbBlnqJzqKA6dXIgpkUPTAjuPE2%2F5LGgtkBHUgFXUMq8WUlaqlS7bVgYg40jAJt2UXGNJPs9LK6l","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

It's easy to start writing code with Python: that's why the language is so immensely popular. However, Python has unique strengths, charms, and expressivity that can be hard to grasp at first -- as well as hidden pitfalls that can easily trip you up if you aren't aware of them. Effective Python will help you harness the full power of Python to write exceptionally robust, efficient, maintainable, and well-performing code. Utilizing the concise, scenario-driven style pioneered in Scott Meyers's best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, shortcuts, and realistic code examples from expert programmers.

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
Each section contains specific, actionable guidelines organized into items, each with carefully worded advice supported by detailed technical arguments and illuminating examples. Using Effective Python, you can systematically improve all the Python code you write: not by blindly following rules or mimicking incomprehensible idioms, but by gaining a deep understanding of the technical reasons why they make sense.

Frequently bought together

This item: Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series)
$11.60
Get it Feb 24 - 25
Only 1 left in stock - order soon.
Ships from and sold by MidwestMixedMedia.
+
$13.09
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
+
$135.00
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
spCSRF_Treatment
Some of these items ship sooner than the others.
Choose items to buy together.

From the Publisher

Python Programming
59 Specific Ways to Write Better Python
Python Programming
5+ Hours of Video Instruction
Python Reference
Definitive Reference Guide
Python Libraries
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 $28.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

Brett Slatkin is a Senior Staff Software Engineer at Google. He is the engineering lead and co-founder of Google Consumer Surveys. He formerly worked on Google App Engine's Python infrastructure. He is the co-creator of the PubSubHubbub protocol. 9 years ago he cut his teeth using Python to manage Google's enormous fleet of servers. Outside of his day job, he works on open source tools and writes about software, bicycles, and other topics on his personal website. He earned his B.S. in Computer Engineering from Columbia University in the City of New York. He lives in San Francisco.

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
  • Customer Reviews:
    4.6 4.6 out of 5 stars 381 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Brett Slatkin
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

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

4.6 out of 5 stars
381 global ratings

Review this product

Share your thoughts with other customers

Customers 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

64 customers mention "Information quality"59 positive5 negative

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

24 customers mention "Clarity"24 positive0 negative

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

6 customers mention "Readability"6 positive0 negative

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

6 customers mention "Value for money"3 positive3 negative

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

This is the book to bring your Python skill to the next level
5 out of 5 stars
This is the book to bring your Python skill to the next level
Purchase a copy today, received it about 2 hrs ago and I cant put it down!! I started at chapter 4 (Metaclasses and Attributes) all I can say is my Python 3rd eye has open!!
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • Reviewed in the United States on April 22, 2016
    I 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.
    9 people found this helpful
    Report
  • Reviewed in the United States on April 7, 2015
    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 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.
    33 people found this helpful
    Report
  • Reviewed in the United States on April 9, 2023
    Straight 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, 2019
    Although 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.
    One person found this helpful
    Report
  • Reviewed in the United States on March 12, 2015
    Guess 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.
    4 people found this helpful
    Report
  • Reviewed in the United States on June 25, 2018
    I'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.
    9 people found this helpful
    Report
  • Reviewed in the United States on November 23, 2015
    excellent 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.
    2 people found this helpful
    Report

Top reviews from other countries

Translate all reviews to English
  • Cristian
    5.0 out of 5 stars Contenido excelente
    Reviewed in Mexico on August 19, 2023
    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.
  • Max
    5.0 out of 5 stars Der Titel hält was er verspricht!
    Reviewed in Germany on July 16, 2019
    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 Stepney
    5.0 out of 5 stars This excellent little book will make you a better Python programmer in many ways
    Reviewed in the United Kingdom on January 1, 2019
    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 Kumar
    5.0 out of 5 stars Great book
    Reviewed in India on September 23, 2017
    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 Sim
    5.0 out of 5 stars Well written Intro to experienced programmers
    Reviewed in Australia on August 26, 2019
    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...