Home Review of the book - "Learning Python"
Post
Cancel

Review of the book - "Learning Python"

During my initial familiarization with the Python and computing in general, I tried obtaining knowledge from multiple sources. Yet I always preferred books as the main knowledge source so hereby I present a short review of one of the most comprehensive books written on Python which I bought five years ago.

Learning Python

“Learning Python” is a thick, heavy reference book which is mostly oriented towards advanced users. With a length of over a 1500 pages, it is a bit overwhelming to beginners as it dives deeply into the matter, explaining fine grains not only of the Python itself, but often deals with broader concepts in the computing science as well (as opposed to the book I previously reviewed ). It can be considered as a textbook too as it could be read from the start to beginning, but as this is a book on programming with a myriad of concepts that are best understood, memorized and utilized through actual usage (i.e. experimenting with the code), it is better suited as a reference book. It is definitively not a workbook.

Skimming through contents reveals the structure of the syllabus: after a light introductory text on the Python itself, including history, installation and IDE, the focus goes to the Python types and supported operations. This chapter deals with the most important data structures and introduces the dynamic typing to the user. I read multiple programming books (besides on Python mostly on Java and C#) and this book provides one of the best explanations of many general programming concepts like conditional statements, functions and function scopes and even some parts of object-oriented programming. This could partially be explained due to the fact that the Python is significantly lighter in syntax and sometimes features than aforementioned programming languages, but on a lower level, reader really needs to understand more complex topics and often the author gives the concepts comparison with other languages along with the description of its function in Python, for instance take a look at those excerpts:

  • “Readers with a background in C may find Python references similar to C pointers (memory addresses). In fact, references are implemented as pointers, and they often serve the same roles, especially with objects that can be changed in place (more on this later). However, because references are always automatically dereferenced when used, you can never actually do anything useful with a reference itself; this is a feature that eliminates a vast category of C bugs. But you can think of Python references as C “void*” pointers, which are automatically followed whenever used.”

  • “If you’ve ever used C++ or Java, you’ll recognize that Python’s self is the same as the this pointer, but self is always explicit in both headers and bodies of Python methods to make attribute accesses more obvious: a name has fewer possible meanings.”

  • “Like the unified try, chained exceptions are similar to utility in other languages (including Java and C#) though it’s not clear which languages were borrowers. In Python, it’s a still somewhat obscure extension, so we’ll defer to Python’s manuals for more details.”

What I like is that the material is presented in logical order, starting from the basics and then going up to more complex matters. The book deals with the OOP only in the second half, which isn’t always the case in some other readings where the user is immediately bombarded with it. Note that I don’t have a thing against the OOP but as an advanced concept its comprehension should probably need be somewhat postponed and not rushed nor imposed onto the innocent reader 😊 The OOP chapter consists of some 300 pages which comprises of one fifth of the book and the content is presented in a detailed and resourceful manner. Still, I would like that the chapter on exceptions is presented before OOP, but if one sees this book as a reference rather than a textbook, the ordering of the chapters isn’t important and isn’t linear so my remark in that sense could be discarded.

Chapters on functions, modules and exceptions are great too – they provide practical and theoretical explanations on modular software development through a Python’s prism. Yet they are very detailed with detailed overviews of those topics and advanced programmers will benefit a lot from those materials. The book concludes with advanced topics like byte and Unicode strings, decorators, metaclasses and some other interesting and useful things.

Important notice is that the book is now a decade old, written in 2013. That is a long time in computing. Although one could say that the Python now is more popular and widely used than back then, there were multiple changes in Python itself and there are some complex issues stemming from the version change issues which author covers here. Yet, I believe this is still by far the most comprehensive book on Python and as such still very relevant. It is probably best suited to sit on the shelf next to the programmer’s desk along with some good workbook.

This book definitively has stood the test of time. As Python today is one of the world’s most used programming languages (many sources put it into the top 5), I am convinced that “Learning Python” will (continue to) find its place among the users and that the author will eventually delight the numerous readers with the updated version of the text.

This post is licensed under CC BY 4.0 by the author.