3 ms·
The Python documentation is pretty cool. I frequently go to Chapter 3 (Data Model) and always learn something new reading something I had already read but didn'
by Jugurtha 9y ago
The Python documentation is pretty cool. I frequently go to Chapter 3 (Data Model) and always learn something new reading something I had already read but didn't quite get.
The mailing list has top notch posters who are always willing to help.
The IRC channel (#python) has very helpful members who've been patient with me on more than one occasion.
Books:
Stacking the deck:
"Python Guide" - Kenneth Reitz: The bits one doesn't necessarily think about but that simplify life: virtual environments, unit test, project structure, good practices, scenarios for different kinds of applications, documentation, etc.
Doing stuff:
"Python Cookbook" (several editions by different authors, Alex Martelli and David Beazley): as the title states, it's a cookbook that shows you how to do a bunch of stuff in Python (files, network, threads, etc). This can get you "operational" in Python pretty fast.
Doing stuff well (meta):
"Writing Idiomatic Python" - Jeff Knupp:
The book comes for Python 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/ 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: I've read that starting out in Python. Maybe not for a 15 year Perl veteran, but this is for memo.
There's certainly some overlap in these books, but it helps to repeat a message to understand the importance of something, or to drive a point home. I didn't use virtual environments until the message was repeated enough in different ways.
Pornography:
PyCon talks. A lot of these are great.
David Beazley (a bunch of talks that are pretty cool. Still haven't finished the ones on generators but they're very good).
Brandon Rhodes (on aesthetics and design patterns (or lack thereof), and testing web applications).
Kenneth Reitz on design.
Raymond Hettinger (you'll find "Writing Beautiful Idiomatic Python" and "Beyond PEP8" most helpful).
- saamm 9y agoSeconding the recommendation on Chapter 3! Well-defined special/dunder/magic methods can make your code way more readable.
- vram22 9y agoSeconding the recommendation for the Python Cookbooks (by O'Reilly). I have both the Py 2 and Py 3 versions. I've read the 2 book (multiple authors) pretty much fully (and much of it more than once), except for a few more advanced recipes, or areas that I was not that interested in, and found it really good. Used some of the ideas and techniques in some production code. The chapter in it on iterators and generators is particularly good (some of the stuff in it is by Raymond Hettinger, who also, IIRC, designed and implemented much of the iterator and generator functionality in Python 2). I've only read parts of my copy of 3 so far, but it is good too, though the style is somewhat different. It is more brief (per recipe, though the book overall is as large or larger than 2), and you have to do more work yourself to understand the recipes. The authors explicitly say this.
- alfiedotwtf 9y agoWow, thanks for the list! I'll check them all out. Yep, I remember the Perl Cookbook being invaluable, will give that a go too
- asicsp 9y agogood list! links for Raymond Hettinger ones * https://gist.github.com/JeffPaine/6213790 https://gist.github.com/JeffPaine/6213790 * https://www.youtube.com/watch?v=OSGv2VnC0go https://www.youtube.com/watch?v=OSGv2VnC0go