![Amazon prime logo](https://m.media-amazon.com/images/G/01/marketing/prime/2022PrimeBrand/Logos/Prime_Logo_RGB_blue._CB566308931_.png)
Amazon Prime Free Trial
FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with FREE Delivery" below the Add to Cart button and confirm your Prime free trial.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited FREE Prime delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
-35% $45.37$45.37
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Very Good
$41.28$41.28
Ships from: Amazon Sold by: Perpetual Textbooks
![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: 90 Specific Ways to Write Better Python (Effective Software Development Series) 2nd Edition
There is a newer edition of this item:
Purchase options and add-ons
Updated and Expanded for Python 3
It’s easy to start developing programs with Python, which is why the language is so popular. However, Python’s unique strengths, charms, and expressiveness can be hard to grasp, and there are hidden pitfalls that can easily trip you up.
This second edition of Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 90 Python best practices, tips, and shortcuts, and explains them with realistic code examples so that you can embrace Python with confidence.
Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll understand the best way to accomplish key tasks so you can write code that’s easier to understand, maintain, and improve. In addition to even more advice, this new edition substantially revises all items from the first edition to reflect how best practices have evolved.
Key features include
- 30 new actionable guidelines for all major areas of Python
- Detailed explanations and examples of statements, expressions, and built-in types
- Best practices for writing functions that clarify intention, promote reuse, and avoid bugs
- Better techniques and idioms for using comprehensions and generator functions
- Coverage of how to accurately express behaviors with classes and interfaces
- Guidance on how to avoid pitfalls with metaclasses and dynamic attributes
- More efficient and clear approaches to concurrency and parallelism
- Solutions for optimizing and hardening to maximize performance and quality
- Techniques and built-in modules that aid in debugging and testing
- Tools and best practices for collaborative development
Effective Python will prepare growing programmers to make a big impact using Python.
- ISBN-100134853989
- ISBN-13978-0134853987
- Edition2nd
- PublisherAddison-Wesley Professional
- Publication dateNovember 15, 2019
- LanguageEnglish
- Dimensions7 x 0.9 x 9 inches
- Print length480 pages
Frequently bought together
![Effective Python: 90 Specific Ways to Write Better Python (Effective Software Development Series)](https://images-na.ssl-images-amazon.com/images/I/71SkiXvWZwL._AC_UL116_SR116,116_.jpg)
Customers who viewed this item also viewed
From the Publisher
![Woman reading book by the computer](https://m.media-amazon.com/images/S/aplus-media-library-service-media/26b21554-6147-40ed-862b-25982b6282ad.__CR0,150,970,300_PT0_SX970_V1___.jpg)
Read this book if you want to write
exceptionally robust and well-performing code
code that’s easier to understand, maintain, and improve
functions that clarify intention, promote reuse, and avoid bugs
Editorial Reviews
Review
“I have been recommending this book enthusiastically since the first edition appeared in 2015. This new edition, updated and expanded for Python 3, is a treasure trove of practical Python programming wisdom that can benefit programmers of all experience levels.”
–Wes McKinney, Creator of Python Pandas project, Director of Ursa Labs
“If you’re coming from another language, this is your definitive guide to taking full advantage of the unique features Python has to offer. I’ve been working with Python for nearly twenty years and I still learned a bunch of useful tricks, especially around newer features introduced by Python 3. Effective Python is crammed with actionable advice, and really helps define what our community means when they talk about Pythonic code.”
–Simon Willison, Co-creator of Django
“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’ve discovered many ways to improve my Python code to make it faster (e.g., using bisect to search sorted lists), easier to read (e.g., enforcing keyword-only arguments), less prone to error (e.g., unpacking with starred expressions), and more Pythonic (e.g., using zip to iterate over lists in parallel). Plus, the second edition is a great way to quickly get up to speed on Python 3 features, such as the walrus operator, f-strings, and the typing module.”
–Pamela Fox, Creator of Khan Academy programming courses
“Now that Python 3 has finally become the standard version of Python, it’s already gone through eight minor releases and a lot of new features have been added throughout. Brett Slatkin returns with a second edition of Effective Python with a huge new list of Python idioms and straightforward recommendations, catching up with everything that’s introduced in version 3 all the way through 3.8 that we’ll all want to use as we finally leave Python 2 behind. Early sections lay out an enormous list of tips regarding new Python 3 syntaxes and concepts like string and byte objects, f-strings, assignment expressions (and their special nickname you might not know), and catch-all unpacking of tuples. Later sections take on bigger subjects, all of which are packed with things I either didn’t know or which I’m always trying to teach to others, including ‘Metaclasses and Attributes’ (good advice includes ‘Prefer Class Decorators over Metaclasses’ and also introduces a new magic method ‘__init_subclass__()’ I wasn’t familiar with), ‘Concurrency’ (favorite advice: ‘Use Threads for Blocking I/O, but not Parallelism,’ but it also covers asyncio and coroutines correctly) and ‘Robustness and Performance’ (advice given: ‘Profile before Optimizing’). It’s a joy to go through each section as everything I read is terrific best practice information smartly stated, and I’m considering quoting from this book in the future as it has such great advice all throughout. This is the definite winner for the ‘if you only read one Python book this year...’ contest.”
–Mike Bayer, Creator of SQLAlchemy
“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. The second edition updates the advice for Python 3, and it’s fantastic! I’ve been using Python for almost 20 years, and I learned something new every few pages. The advice given in this book will serve anyone well.”
–Titus Brown, Associate Professor at UC Davis
“Once again, Brett Slatkin has managed to condense a wide range of solid practices from the community into a single volume. From exotic topics like metaclasses and concurrency to crucial basics like robustness, testing, and collaboration, the updated Effective Python makes a consensus view of what’s ‘Pythonic’ available to a wide audience.”
–Brandon Rhodes, Author of python-patterns.guide
About the Author
Brett Slatkin is a principal software engineer at Google. He is the technical co-founder of Google Surveys, the co-creator of the PubSubHubbub protocol, and he launched Google’s first cloud computing product (App Engine). Fourteen years ago, he cut his teeth using Python to manage Google’s enormous fleet of servers. Outside of his day job, he likes to play piano and surf (both poorly). He also enjoys writing about programming-related topics on his personal website (https://onebigfluke.com). He earned his B.S. in computer engineering from Columbia University in the City of New York. He lives in San Francisco.
Product details
- Publisher : Addison-Wesley Professional; 2nd edition (November 15, 2019)
- Language : English
- Paperback : 480 pages
- ISBN-10 : 0134853989
- ISBN-13 : 978-0134853987
- Item Weight : 2.31 pounds
- Dimensions : 7 x 0.9 x 9 inches
- Best Sellers Rank: #208,816 in Books (See Top 100 in Books)
- #109 in Computer Programming Languages
- #197 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's content helpful and informative. They appreciate the clear explanations and examples that help them understand pythonic code writing. The book is described as an effective resource for learning python and considered the best of its kind.
AI-generated from the text of customer reviews
Customers find the book's content useful and engaging. They appreciate the practical approach and deep knowledge it provides on Python features and practices. While some of the layout and indentation issues are mentioned, overall, customers find the content helpful and insightful.
"...this book specifically shows you things specific to python...." Read more
"...been writing Python code for years, and this was a great introduction to new Python features and practices that will improve my code significantly...." Read more
"...Also add new features of python 3." Read more
"...I really like the Effective series of technical books. Very pragmatic and useful. Definitely ups my coding proficiency." Read more
Customers find the book helpful for learning pythonic code. They appreciate the clear explanations and examples, whether you're a beginner or experienced. The book is well-written and practical, making it useful for coding.
"...this is by far the best one in regards to writing "pythonic" code...." Read more
"Each trick is short but explained very clear, no matter you are a beginner or advanced programmer. Also add new features of python 3." Read more
"...The tips are quite practical and useful. I really like the Effective series of technical books. Very pragmatic and useful...." Read more
"Well written with examples to make one understand pythonic way of writing code." Read more
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on May 16, 2020I own 8 python books as of right now. this is by far the best one in regards to writing "pythonic" code. most of the other books that I own focus on syntax, and how to write python code in the style that you would write in other languages. this book specifically shows you things specific to python. I would recommend one of the other books as a first, if you have never coded before, my favorite was python crash course, from no starch press.. but if you just want to learn python, and specifically how to be effective in python specific things, this is the book.
- Reviewed in the United States on July 3, 2020I've been writing Python code for years, and this was a great introduction to new Python features and practices that will improve my code significantly. Some of the examples appear contrived and are too long, but overall I'm very happy with this book.
- Reviewed in the United States on February 11, 2022Each trick is short but explained very clear, no matter you are a beginner or advanced programmer.
Also add new features of python 3.
- Reviewed in the United States on February 12, 2021I've been programming in C, C++, and Java since the mid 90's. In the last year my job has transitioned to more python work. Python wasn't hard to pick up, almost made me feel guilty programming, but I was programming in python like I would in C, C++. Looking at others code a lot of their design decisions didn't make sense.
This book does a great job of explaining a lot of the python best practices.. and "quirks" of the language.
- Reviewed in the United States on July 27, 2021I enjoyed book a lot, very inspiring and filled with insights.
However, code in the book has wrong indentations which make
it harder to read. I think publisher could use little polishing
- Reviewed in the United States on March 11, 2020I bought this for our team, and we are enjoying reading through the items.
The tips are quite practical and useful.
I really like the Effective series of technical books. Very pragmatic and useful.
Definitely ups my coding proficiency.
- Reviewed in the United States on December 15, 2019Great resource on what can feel like an overwhelming topic.
I’ve completed Automate The Boring Stuff and I’m about to finish an M.S. degree that included three python-related computer science courses. This book feels like about the right difficulty level for me. I would recommend it to anyone who has completed ATBS.
- Reviewed in the United States on March 19, 2020A great book on pythonic thinking and best practices in Python.
I only wish there would be mention of more common patterns such as factory patterns, etc.
Overall a lot of deep knowledge, though.
Top reviews from other countries
- Barry HallReviewed in Canada on April 8, 2024
5.0 out of 5 stars The best book on Python I have ever bought!
This is a book for people who already know Python fairly well and want to take it to a higher level of mastery. It is not intended to be read sequentially from cover to cover but rather kept nearby for quick insight on how to do things better. It is not one of those giant 10lb books that tries to be the ultimate Python 'Bible'. It is compact, well written and printed on high quality paper. Get the paper back version not the e-book, you will never part with it!
- Client d'AmazonReviewed in France on March 15, 2022
5.0 out of 5 stars a must read
full of Technic to apply in our daily work
- F.Reviewed in Spain on August 21, 2021
5.0 out of 5 stars A must have for Python programmers
This book Will help you mastering your Python skills and devoloping software in real world situations.
The way of ordering the book content is wondeffull. It has 90 items (ordered in general topics). You can read each item individually when you want to remember how to use a tool or a concept.
The book comes with a very nice paper, It feels like plastic paper and It is very confortable.
-
Rodrigo ZamoraReviewed in Mexico on July 17, 2020
5.0 out of 5 stars Simplemente excelente
Este libro es fácil de entender, da muy buenas recomendaciones y técnicas para hacer tu código de alta calidad y
eficiente, es un libro de referencia que debes tener.
La calidad es excelente y viene a color algo que siempre se agradece, las hojas son gruesas y plastificadas lo que le dan gran resistencia, el único pero, es que presenta un reflejo producto del tipo de papel que hace que leer sea dificil ne fuentes de luz directa, por lo demás esta perfecto
-
Georges SeilReviewed in Germany on November 30, 2020
5.0 out of 5 stars Python ohne Kursus lernen
Ds Buch ist sehr strukturiert und klar aufgebaut.
Absolut empfehlenswert vom Einsteiger bis zum Spezialisten. Auch Spezialisten brauchen manchmal Gedächnishilfen.
Ich habe mir dieses Buch zusammen mit "The Python Quick Syntax Reference" gekauft um zum einen eine sehr detaillierte Referenz und zum anderen eine schnelle Beispiel Library zu nutzen.