Python Tricks: A Buffet of Awesome Python Features
“I don’t even feel like I’ve scratched the surface of what I can do with Python”
With Python Tricks: The Book you’ll discover Python’s best practices and the power of beautiful & Pythonic code with simple examples and a step-by-step narrative.
You'll get one step closer to mastering Python, so you can write beautiful and idiomatic code that comes to you naturally.
"-": Python 2 vs 3 difs.
"+": Short and up-to-the point style
"+": Lots of cool ideas
"+": Practical implications not just 'oh yeah there's something that works somehow in P'
"+": Good explanations
"+": Many examples
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__ alon ...more
What I want from a coding book is always the same two things: (1) feel sad+happy while reading it: sad for parts of my codebase and happy that I am reading it, (2) Understand better patterns of the programming language an ...more
I have used python before but wanted to gain more advance knowledge. Fluent python is the Bible these days but it is too long (almost 800 pages). From my experience, you don’t need all language features to use a language affectively (think 80/20 rule). That is why this book was so appealing to me and it didn’t disappoint. If you want to save time and gain deeper insight into the python language, read this book.
-Asserts are used to catch BUGS/unrecoverable errors, not erroneous user input, and make code more maintainable and help developers. Assets will just be ignored under certain circumstances and may pose a security risk when being relied upon in production. Never use it for data validation. Use "if + raise" for validation. (p. 14)
-Use a comma after the las ...more
So after a while I decided to purchase Dan's "Python Tricks" book. The book is written with th ...more
In general, this is a very good book for learning the Python programming language. There is either an experienced programmer or the only beginner is able to find something interesting and new for himself or strengthen his skills in the already known material and find out some features of the language.
The presentation of material here is great, so it reads lightly and you don't get tired of it, like of such books as Learn Python the Hard Way or Python Progr ...more
Also, i found each chapter is fun to read in spite it is something i've already known before, because sometimes the contents radically change my paradigm when understanding the concept.
Last but not least, this can become one of the good reference book when you forget something about the Python concept (at least this is what i've done ...more
I have to say that this book is not for beginner. You should only pick this up once you are at least familiar with the language and all the basic objects (function, list, dictionary, set, string, ...) ...more
Dive into the book if:
1. You are already familiar with basic python data structures (list, stack, set, dictionary, mutable and immutable objects).
2. You are c ...more
I took my time, thought about each chapter and tried to apply it as soon as I read it - or at least think where I could apply it. Also, I'm not new to Python, so there were a lot of "tricks" I already know and use - but for those cases, I used the examples to verify that I really know it and it is always good to read someone else exp ...more
It is written in a very understandable but at the same time concise style. While it assumes the reader already has a decent understanding of programming in general and skips the basics, it gets pretty detailed in medium to advanced Python syntax, patterns and useful libraries; which makes it perfect for a developer experienced in another language, but relatively new to Python. If you really want to go beyond the basics, without having to swallow the en ...more
This is not a reference book in which you you can find all the nitty-gritty details about a method, module... Buy and read this book if you want to know leverages and tricks in Python that the author has simply and beautifully laid out.
This book, again, should not be a book for those who has not known Python yet. There must be some sufficient exposure to the language to get all the benefits that it provides.
In general, it is a great book to have
Full review: https://no-title.victordomingos.com/a... ...more
Concrete knowledge and tricks about Python. Not as deep as Fluent Python but more practical and accessible. I like some of the examples which explained some complex concept well. To be honest, most of the content can be found on real python website and also his personal website.thus probably not worthwhile to pay for it. However I still bought this to show my support.
Dan Bader has an elegant and informative writing style that keeps you locked in, just one more chapter, till none are left. I have been writing Python for a few years now and this book helped to connect dots for me, especially around lambda functions, decorators and classes.
Good Tricks Buffet for Everyday Python Programming, the Pythonist Way! Very helpful and recommended for beginners and intermediate level. Need more concrete example though than explaining the tricks with very simple examples. Recommended for all python programmers.
Goodreads is hiring!
Learn more »