Anurag Rana          Projects     Contact Me     Blog    
Top (max 10) reviews: Python Tricks: A Buffet of Awesome Python Features.

4.9 out of 5.0    126 total reviews.

Buy This Book
All Books
5.0 out of 5.0 -

by Nick F on Jan. 25, 2018

Great read! Really great for those that are already familiar with Python and want to go beyond the basics

4.0 out of 5.0 -

by Geert Jan Bex on Jan. 19, 2018

It's nice to see a very recent book (discussing Python 3.6 features) on some of the more tricky aspects of Python programming. The issues involved are explained clearly, and the examples provided are typically well-chosen.

5.0 out of 5.0 -

by Adams Family on Jan. 27, 2018

Excellent resource for my growing coding skills.

5.0 out of 5.0 -

by Brett Mcsweeney on Oct. 29, 2017

I remember reading a thread on a Python help forum where the question was how to select items from a list at random, but not select the same one twice, and the person posting the question proposed a solution which was probably a dozen lines long. Someone chimed in with a tweak that reduced the code size somewhat, another few tweaks and the code got down to about six lines. The someone posted a one line solution using a function from the standard library (shuffle). There were no more entries to the thread after that.
Being able to go directly to the equivalent of that one-line Pythonic solution without mucking around with approaches based on the traditional languages that we all learn, such as C, is a major benefit of Dan's book. Other languages have their strengths of course, but to really utilize the power of Python takes so much more than just learning the syntax. It's a new way of thinking; it's a whole forest of great library functions, and a great guide such as Dan is absolutely essential to becoming truly proficient.
This is book is that guide.

5.0 out of 5.0 -

by Brian Skinn on Nov. 14, 2017

I consider myself an 'early intermediate' Pythonista, with about three years of self-taught experience in the language, bolstered by all the good resources out there online. I first ran across Dan's page/blog through a Twitter link, I think, and have really enjoyed his Python Tricks emails. Some of them aren't news to me, but there have been multiple instances where they've given me a key insight into the behavior of Python, or an idea that's helped me improve my projects.
As he notes in the Introduction, this book grew out of the Python Tricks emails, and it really shows. Dan has a knack for constructing code snippets that illustrate Python concepts in very few lines, and also for writing extremely clear descriptions of why they behave as they do. Further, even though Dan has years of Python experience, it seems clear to me he hasn't lost the sense of the ways in which Python can be confusing to new learners. I've only sampled here and there from his Buffet at this point, but have already gained two new concrete pieces of knowledge: bytearrays are mutable whereas bytes are not; and all it takes to create an abstract base class is to use metaclass=ABCMeta and decorate as needed with @abstractmethod. Even though I'd looked at the Python documentation for both of these before, I never quite understood either of them. But, Dan's phrasing and presentation made them crystal clear on my first read.
One additional thing I like about the book is how Dan has included bits and pieces of his philosophy on Python, programming, writing good code, etc. Some people might be turned off by the editorializing, I suppose, but I really appreciate that the book provides these sorts of "meta" perspectives.
All in all, an excellent resource for someone with modest to moderate Python experience looking to round out their knowledge of some of the more subtle features/behaviors of the language.

5.0 out of 5.0 -

by Eric Nichols on Jan. 1, 2018

I'm an advanced python user and have worked at several startups, Google, and Microsoft, but I still found several tips in here that were new to me, and many others that I only knew because I'd learned them from colleagues when I worked at Google. For instance, I would usually just define an __str__ method on my custom classes and be lazy and not implement __repr__. But the book points out that if you want be lazy, just define __repr__ alone, as the default behavior of __str__ will call your __repr__ function anyway. I should have known this already but somehow it's a little thing I had missed when learning python. There are lots of bits of info like this: some you'll probably already know, but you might be surprised by a couple little tricks.
One outstanding feature of the book is a short recap after each section, giving simple rules of thumb to to follow. This cleared up a lot of uncertainty for me about some python best practices. I really like the book "Fluent Python" as well, but this one has more simple and practical suggestions and was a very quick read.
Highly recommended!

5.0 out of 5.0 -

by IcarianVX on Oct. 30, 2017

As an intermediate pythonista, I knew that there were some things I was missing to take me to the next level. This book, along with diligent practice, is getting me there.
While the word "tricks" may seem like you are going to be doing weird, non-normal things with python, this book teaches you quite the opposite. Every level, from beginner to advanced, will absolutely learn something from this book, but not only that, it will help solidify things that you already know or, as was in my case, show you that there are many more things that you can do than you originally thought.
I have more than 20 books on Python. This is the one I ALWAYS check first if I have a question. It doesn't cover everything, obviously, but it is the most coherent, well thought out of the books that I have and I recommend it to anyone that will listen. Do yourself a favor, spend the less than $20 that this book costs and become a better pythonista from page 1.

5.0 out of 5.0 -

by Jean Bilheux on Oct. 30, 2017

I have been using python for a few years and realized, by reading Dan's book, that I could have written much better code if I had this book in my hands months ago. I also found out why I had some strange behavior in my code after reading the chapter about variable and instance classes. I thought I knew dictionaries until I read the part dedicated it in the book.
I love the way the book is written as it almost looks like you have a professional developer talking to you. It's like reading a Dan Brown, once you start you can't stop as you want to know how it ends, how it really works, what the next page's secret or trick is going to be. "What if I stop reading here for today and the next page hides a trick that is going to save must 1 week of work".
No matter if you just started to learn python or are an advanced user, you will always find tons of useful tricks and secrets in this book.

5.0 out of 5.0 -

by SeferTech on Dec. 13, 2017

I really like this book. Why? I think the author and the content is very honest. By that, I mean you get what you expect when you buy this book. I have been coding for over 30 years but using Python for the past decade on and off (mostly off). I have always been amazed by students or colleagues who seem to have this uncanny ability to "master" a language like Python. I have purchased many Python books over the years but none of them really felt like the fit. This one does. I feel this book will take from up from beginning (functions, for loops, arrays, conditionals) to a more advanced programming using programming constructs beyond the basics. I also like the authors videos, blog and overall attention to detail in preparing this book and his honest marketing. I also like how this looks on the Kindle and I appreciate his recent video describing his efforts to make sure the reader has a good Kindle experience. Bottomline, for $10 (currently on sale) this is a bargain on the Kindle! Grab your copy today...