Expert Python Programming, Second Edition (英語) ペーパーバック – 2016/5/20
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Become an ace Python programmer by learning best coding practices and advance-level concepts with Python 3.5
About This Book
- Based on the latest stable version of Python (version 3.5)
- Creating well manageable code that will run in various environments with different sets of dependencies
- Packed with advanced concepts and best practices to write efficient Python code
Who This Book Is For
The book would appeal to web developers and Python programmers who want to start using version 3.5 and write code efficiently. Basic knowledge of Python programming is expected.
What You Will Learn
- Conventions and best practices that are widely adopted in the python community
- Package python code effectively for community and production use
- Easy and lightweight ways to automate code deployment on remote systems
- Improve your code's quality, reliability, and performance
- Write concurrent code in python
- Extend python with code written in different languages
Python is a dynamic programming language, used in a wide range of domains by programmers who find it simple, yet powerful. Even if you find writing Python code easy, writing code that is efficient and easy to maintain and reuse is a challenge.
The focus of the book is to familiarize you with common conventions, best practices, useful tools and standards used by python professionals on a daily basis when working with code.
You will begin with knowing new features in Python 3.5 and quick tricks for improving productivity. Next, you will learn advanced and useful python syntax elements brought to this new version. Using advanced object-oriented concepts and mechanisms available in python, you will learn different approaches to implement metaprogramming. You will learn to choose good names, write packages, and create standalone executables easily.
You will also be using some powerful tools such as buildout and vitualenv to release and deploy the code on remote servers for production use. Moving on, you will learn to effectively create Python extensions with C, C++, cython, and pyrex. The important factors while writing code such as code management tools, writing clear documentation, and test-driven development are also covered.
You will now dive deeper to make your code efficient with general rules of optimization, strategies for finding bottlenecks, and selected tools for application optimization.
By the end of the book, you will be an expert in writing efficient and maintainable code.
Style and approach
An easy-to-follow guide that covers industry followed best practices in Python programming
Michal Jaworski has 7 years of experience in Python. He is also the creator of graceful, which is a REST framework built on top of falcon. He has been in various roles at different companies: from an ordinary full-stack developer through software architect to VP of engineering in a fast-paced start-up company. He is currently a lead backend engineer in TV Store team at Opera Software. He is highly experienced in designing high-performance distributed services. He is also an active contributor to some of the popular Python open source projects.
The book is split into 14 chapters. It is well written and the discussion flows well through the paragraphs. While not native, the author writes down plain good English, which is something that must not be taken for granted in Packt Publishing books. The book starts with an introduciton on the current status of the language and the many problems v3 caused. An interesting chapter, even though it doesn't get as deep as it should. It then discusses best practices. Here I start having my first doubts: best practices are an excellent subject, no doubts. But the author ends up talking about concepts such as MRI and the abstract syntax tree. If you are a Python developer and never heard of them, do not worry. You won't really need them unless you are interested in the very core of the language, at which point this is not the book you are looking for.
Several chapters we find later on are, again, interesting maybe, but probably not necessary. Chapter 4, for example, is about good names. Excellent. Now, given the fact that picking good names should be the first thing we learn as we start studying any programming language, the author often uses names related to ice creams or similar. Similarly, the chapters dedicated to managing the code, aka how to use Git, and documenting the code are not bad but, according to me, should not be here.
From a book that should take the beginner Python developer into the next level I would expect coverage of topics such as distributing and deploying code, as well as concurrency. Generators. Debugging. Lambdas. Some of these concepts are discusses. Chapter 6, for example, covers the deployment of code. I enjoy it very much when an author discusses the 12-factor application concept, as well as when he provides good hints such as making sure the code runs in user space. Definitely my favorite chapter of the fourteen.
Overall, not bad. Not among the best Python books out there, but not bad. Being happy with the first edition, I was expecting more. The real problem was not the quality of what has been provided, but according to me the choice of topics.
I still suggest Fluid Python and Effective Python to anyone interested in advanced Python topics.
This book is a very good complement for medium or advanced Python developers, not because it will give hard core deep details of all Python internals, but because it delivers to the reader a broad range of subjects that makes the Python programmer a comprehensive developer, giving the ability of carrying forward complex projects in the real life day to day.
Even so, this book explains several interesting subjects, not frequently addressed from the specific Python point of view, like concurrency, useful Python design patterns, or optimization.
In the broader area, it addresses several subjects that are very related to Python programming but are not Python itself, like buildbots, packaging, test driven development, how to properly document your project, etc.
In total, a valuable book for those that want to enhance their developing skills.
Updated to the latest stable version of the language (Python 3.5), the book covers topics such as: Conventions and best practices adopted in the Python community, Python Package for production use, extend Python with other programming languages, concurrent python.
Its authors are an experienced Python developers who also happens to be an excellent writers.
Given my experience and goals, this book was a perfect read if you want to improve the quality and performance of your Python code.
A good buy, recommended