Master the secret tools every Python programmer needs to know Professional Python goes beyond the basics to teach beginner- and intermediate-level Python programmers the little-known tools and constructs that build concise, maintainable code. Design better architecture and write easy-to-understand code using highly adoptable techniques that result in more robust and efficient applications. Coverage includes Decorators, Context Managers, Magic Methods, Class Factories, Metaclasses, Regular Expressions, and more, including advanced methods for unit testing using asyncio and CLI tools. Each topic includes an explanation of the concept and a discussion on applications, followed by hands-on tutorials based on real-world scenarios. The "Python 3 first" approach covers multiple current versions, while ensuring long-term relevance.
Python offers many tools and techniques for writing better code, but often confusing documentation leaves many programmers in the dark about how to use them. This book shines a light on these incredibly useful methods, giving you clear guidance toward building stronger applications.
Learn advanced Python functions, classes, and libraries Utilize better development and testing tools Understand the "what," "when," "why," and "how" More than just theory or a recipe-style walk-through, this guide helps you learn — and understand — these little-known tools and techniques. You'll streamline your workflow while improving the quality of your output, producing more robust applications with cleaner code and stronger architecture. If you're ready to take your Python skills to the next level, Professional Python is the invaluable guide that will get you there.
This is a great intermediate Python book. The explanations are clear and informative. The author did a great job filling in the necessary prerequisite conceptual knowledge required to grasp the paradigms. The author also did a good job "building up" within each section, i.e. he doesn't open a firehose at the reader but rather explains concepts logically and in manageable steps, building upon each layer to bring the reader towards a fuller understanding of the concept(s) being presented.
There were only minor errors in the text (most of which I've reported to the author via Twitter, with the exception of a couple simple spelling errors), which is outstanding for a book written by a programmer (I've come to expect far more spelling errors from programmer authors -- especially in examples). I'm impressed -- the book is well written.
Part II combines theory and practice more than in other areas of the book, and I was hoping to see more on multiple inheritance / mixins, but the material covered was excellent. Using examples from Django for metaclasses was very helpful to me.
The asyncio section was good but only applicable to Python 3.4, I was hoping for more discussion of threading and Python 2 solutions as well (perhaps even discussion of greenlets contrasted to threads -- up until this point the book offered approaches for both v2 and v3). I also expected to at least see a brief explanation of the GIL when discussing asynchronous programming in Python, but no such reference was made. Even so, the explanation of the asyncio module was very elucidating and I believe the author exceptionally achieved his goals for that section of the book (it isn't completely fair to give a negative review for something excluded by the author).
Overall, I highly recommend this book to Python programmers looking to move beyond the basics into an intermediate level of the Python language and am glad to give it four stars.
A very good Python book. Advanced topics are covered in a simplistic and easy-to-follow way. I really enjoyed reading it and learned a lot from it. The author is a well-versed Pythonista!
Python is a high-level, versatile programming language used in many fields, from web development up to machine learning, passing through image analysis and game programming. It is easy to fall in love with it. Having such a vibrant community, and being used in top projects such as Docker and Openstack, results in a lot of titles available to anyone interested in getting started with it. On the other hand, those Pythonists that already know the basics and wanna dive into the most advanced features of the language often strive to find a valid source of information. Professional Python belongs to this short list of books dedicated to advanced topics, those that any professional needs to know and that most alternatives do not touch at all.
Released in 2015, Professional Python is a medium sized book that, as the title suggests, covers advanced topics. As such, it targets intermediate to experienced Pythonists and avoids anything related to the basics: installation, classes, data types. The book is split into sections, each spanning several chapters. Each chapter focuses on a very specific subject, such as metaclasses, decorators or generators. After a short introduction, the author presents a scenario, used to show many different features or ways to tackle the problem. One paragraph, one feature. This is a winning approach. Instead of long sermons, the authors dives into a very specific topic, showing how that feature improves the initial scenario.
The topics discussed by the author are well chosen and appropriate for such an advanced title. The examples are short but intense. There is plenty of code, and while the author often goes through it step by step, the reader more often than not needs to give it a second read to fully understand what is going on. Having a terminal open and trying to tinker the code presented is probably the best way to get the most out of this book.
Overall Professional Python is a good book. There are better alternatives, but it's a good read. After reading the first chapter, dedicated to decorators, I was expecting something better. This first chapter was indeed very good and definitely raised the expectations. Unfortunately, later on, I felt the quality of the content lowered and, with it, my final evaluation of this title. Some concepts, indeed, are not clearly explained. For example, generators are presented as functions that instead of executing and returning a single value, send back one or more values in a sequence. I do not agree with this, since a generator function is a function that has at least a yield statement in its body and that returns a generator object.
So a good book, but I would definitely suggest another two titles to any Pythonist interested in advanced topics. These two titles cover more terrain and in a much clearer way: * Fluent Python * Effective Python: 59 Specific Ways to Write Better Python
As usual, you can find more reviews on my personal blog: books.lostinmalloc.com. Feel free to pass by and share your thoughts!