Many experienced programmers try to bend Python to fit patterns they learned from other languages, and never discover Python features outside of their experience. With this book, those Python programmers will thoroughly learn how to become proficient in Python 3.
This book covers:
• The Python data model: understand how special methods are the key to the consistent behavior of objects
• Data structures: take full advantage of built-in types. and understand the text versus bytes duality in the Unicode age
• Functions as objects: view Python functions as first-class objects. and understand how this affects popular design patterns
• Object-oriented idioms: build classes by learning about references. mutability. interfaces. operator overloading, and multiple inheritance
• Control flow: leverage context managers, generators, coroutines, and concurrency with the concurrent.futures and asyncio packages
• Metaprogramming: understand how prOperties. attribute descriptors. class decorators. and metaclasses work
There are (at least) three levels of writing code. The lowest level is writing applications for your own use. Then there is writing applications for others to use, requiring a more solid software engineering approach, and a more effective use of the programming language. And then there is writing application frameworks, for others to use when they are writing applications. This level requires the most sophisticated software engineering, and the most proficient use of the implementation language, to ensure solid, reusable, flexible, and effective frameworks.
This splendid book helps provide increased fluency in Python. Some of the topics are suitable for moving to “level 2”; some for moving all the way to “level 3”. Indeed, there are warning not to use language certain features unless you are working at this highest level: they are just not necessary otherwise.
The writing itself is fluent; there are many annotated code examples; at over 700 pages, the coverage is both broad and deep. If you are moving to a higher level, this book is essential reading. Even it you are writing code only for your own use, there is a lot to learn here about Python and its philosophy, and you will appreciate that it is by no means some “toy” language suitable only for beginners. Python is that rare beast whose clean design makes it easy to learn the basics, and possible to build sophisticated applications and frameworks, and this books helps show how and why.