
Effective Python
by Brett Slatkin · first published 2015
67% recommend33% neutral
Why HN recommends it
Practical, tip-style guidance on writing more Pythonic code, with use cases for each tip. Suits intermediate programmers who know the language and want to see beneath its surface.
Summarised by Claude from recommending comments
The Python programming language has unique strengths and charms that can be hard to grasp. Many programmers familiar with other languages often approach Python from a limited mindset instead of embracing its full expressivity. Some programmers go too far in the other direction, overusing Python features that can cause big problems later. Effective Python provides insight into the Pythonic way of writing programs: the best way to use Python. It builds on a fundamental understanding of the language that I assume you already have. Novice programmers will learn the best practices of Python’s ca
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







…application. You can then take that knowledge and develop tools for yourself and others and put them online for all to access and use. If you want to do it better and "leap-frog", read Brett Slatkin's "Effective Python: 90 Specific Ways to Write Better Python". This book will make you write code as if you had been coding for years... But, that's only doing it "right", you need something to do right in the first place:…
on “Ask HN: Starting a career as a programmer in my mid-40s” ↗…2 and Python 3 and contrasts "harmful" and "good". Jeff Knupp also has videos showing you the process of refactoring code. He also has a blog (https://jeffknupp.com/) where he addresses many topics. "Effective Python: 59 Specific Ways to Write Better Python" - Brett Slatkin: Pretty good book. The subtitle says it all: 59 specific ways to write better Python. (600 + pages). "Learn Python the Hard Way" - Zed Shaw:…
on “Ask HN: What's the best source to learn idomatic Python?” ↗…Framework, Requests and Flask (as well as most things by Kenneth Reitz and Armin Ronacher) are all great codebases to look at. A few other good resources are the blog PyMOTW 3 [1] and Brett Slatkin's book Effective Python [2]. [1]: https://pymotw.com/3/ [2]: http://www.effectivepython.com/
on “Ask HN: Modern, open source python 3 code bases?” ↗Effective Python by Brett Slatkin is very good, still going through the Second Edition, but I like the practical side of this book. If you want to go really deeper like the inner working of CPython I'd recommend Anthony…
on “Ask HN: Advanced Python Coding Books” ↗Focused on systems and design for backend devs: 1. High Performance Browser Networking 2. Designing Data-Intensive Applications 3. Site Reliability Engineering: How Google Runs Production Services 4. Effective Python: 90 Specific Ways to Write Better Python I wrote in a bit more detail here: https://notes.eatonphil.com/books-developers-should-read.htm.... Personally I would definitely not put Pragmatic Programmer,…
on “Ask HN: Name 3-5 books that had the most impact on your career and knowledge?” ↗…2 and Python 3 and contrasts "harmful" and "good". Jeff Knupp also has videos showing you the process of refactoring code. He also has a blog (https://jeffknupp.com/) where he addresses many topics. "Effective Python: 59 Specific Ways to Write Better Python" - Brett Slatkin: Pretty good book. The subtitle says it all: 59 specific ways to write better Python. (600 + pages). "Learn Python the Hard Way" - Zed Shaw:…
on “Ask HN: Catching Up with Python – Resources?” ↗…Shaws book LPTHW and LMPTHW which teaches you to think about composing larger programs. You get a lot of practice on creating common Unix utilities. And once you have some Python under the belt migrate to Effective Python by Brett slatkin. Most importantly you should have an end goal, my initial goal back on 2006 was to get an entry level EE job that payed me a salary to support me and my wife and sponsored H1B. Fast forward…
on “Ask HN: Starting a career as a programmer in my mid-40s” ↗…things (files, networks, servers, binary, data handling). It effectively is a cookbook and helps you have or be aware of several "recipes" to do common things. To write better Python: Brett Slatkin's "Effective Python: [59|90] Specific Ways to Write Better Python" will get him to write good quality Python code "in general". This could reassure potential employers to some degree. Having some familiarity or experience…
on “Ask HN: How best to prepare for Python interviews starting in 3 months?” ↗Some that I've read and enjoyed: - Introducing Python, 2nd Edition by Bill Lubanovic (Beginner Level) - Python Distilled, David M. Beazley (Beginner to Intermediate Level) - Effective Python (2nd Edition), Brett Slatkin (Intermediate Level) - Fluent Python (2nd Edition), Luciano Ramalho (Advanced Level) - CPython Internals, Anthony Shaw (Advanced Level) - Architecture Patterns with Python,…
on “Ask HN: Python Programming Books” ↗* Effective Python This teaches 90 specific ways to be more Pythonic * Robust Python This teaches some architectural / implementation patterns for code bases larger than a script * High Performance Python How to get…
on “Ask HN: Which book would you recommend for learning Python in detail?” ↗…detailed information. Even just reading the table of contents helps to help understand what to focus on during study. My copy of "DevOps Handbook" is covered in tags and handwritten notes. Brett Slatkin's "Effective Python" is way too much for me, but I got a ton out of the parts I focused on. No other media is like books!
on “Nobody cracks open a programming book anymore” ↗Fluent Python Effective Python Dive into Python
on “Ask HN: What are the best Python books for non-programmers?” ↗As luck would have it, my blog on Github pages is down. So here's the post describing the four in markdown. Tldr; Designing Data Intensive Applications, Effective Python, The Google SRE book, and High Performance Browser Networking. https://github.com/eatonphil/notes.eatonphil.com/blob/master...
on “Ask HN: Good books/courses to learn networking essentials for web developers?” ↗…Statistics" for people who need more stats. I'm not even sure what to recommend for developing good software judgment and habits. There doesn't seem to be a shortcut for that. Maybe "Fluent Python" or "Effective Python" for Python people? No idea for the R ecosystem.
on “Best Data Science Books According to the Experts” ↗Write more Python code. Read Effective Python. Write more Python code.
on “Ask HN: Beginner to Competent in Python: How would you approach it?” ↗