Programming in Python 3, second edition
ISBN: 9780321680563
Reviewer Ratings
Relevance:Readability:
Overall:
Buy it now
One Minute Bottom Line
| Programming in Python 3 introduces the reader to Python, the programming language. Using in-depth explanation and clear examples, you’ll thoroughly learn the basics and get introduced to many of the advanced concepts. For beginning programmers, the pace of the book might be a bit too high, while experienced Pythonists will not find the detail they want, especially in the later chapters. If, however, you are experienced in one or more other programming languages and you want to learn Python. This book is the perfect start. |
Review
As the title suggests, this book is about programming Python and more specifically Python 3. The book is divided into 2 sections: one gives a deep explanation of Python’s core concepts and a second section offers an introduction to many of the features that make Python unique. The entire book will mostly appeal to developers with in-depth experience in another programming language who want to learn Python. As you’ll see in the review, many parts of the book will most likely be a little too complicated for beginning programmers and not detailed enough for experienced Python programmers.
The author's homepage is
at: http://qtrac.eu/py3book.html where you can download the examples and solutions to the exercises.
I read this book as an experienced Java programmer with no pre-existing knowledge of Python. When I started reading, I knew Python uses indentation as a way to mark code blocks, but that was about it.
Part 1 – Python’s core
The first part of the book, chapters 1 to 6, goes into the details of the Python programming language itself, and is structured as a manual for self study. Expanding your Python knowledge from chapter to chapter, starting with data types and ending with object oriented programming. Each chapter contains a short introduction why the material that is presented matters and concludes with a number of exercises.
The entire first part manages to walk a very thin line of being too simplistic (and boring) and being too advanced. For instance, I found the information on how to obtain, install and, possibly, build Python entirely unnecessary (or it should be moved to an appendix). I doubt anyone who is going to build Python from source will require instructions and even then, the little information given is probably not sufficient. A few links to download locations would have been just fine for me.
In contrast to this, a few parts tend to rush through some pretty advanced concepts. As an example, in the first chapter, the author goes into some fairly low-level details of what classes are mutable and immutable in Python. I liked to get this inside view, but less-experienced programmers will find this confusing (and at this point in the book, it was also not really necessary to know the difference). Object oriented programming was first introduced in a very basic way, but very quickly ramped up to creating fully integrated custom data types.
Overall though, I think the difficulty was just right. I especially liked how the first chapter immediately dives into some real functioning Python programs. To get you to that point, the author offers 8 basic Python pieces, that, when fitted together, are sufficient to create complete programs. If you have experience programming, you'll have no problem following the examples and will be able to create your own basic programs.
Over the next 5 chapters (Chapters 2-6), those 8 pieces are explained and fleshed out. Again, it was extremely useful to first get this blueprint and later on get all the details. Most of the explanation is very detailed. A bit too much at first, however, this will make sure the book also has value as a reference book later on.
Some examples also introduce techniques and concepts that are not discussed in other parts of the text. So you shouldn’t skip the examples in this book. All examples are clear and to the point without going into unnecessary detail, so you won’t feel the need to skip them anyway.
Part 2 – Programming Python
The second part is mostly about introducing you to many of the Python standard functionality, but also includes some more “advanced” topics such as functional programming, debugging and unit testing. Furthermore, a few key third party libraries are explained.
Various items are given varied coverage. For instance, file handling and parsing get a lot of attention, while networking is just a simple introduction that will require a lot of additional research. A chapter is dedicated to one GUI library, but according to the author itself it isn’t the best one available. Personally, I’d prefer a chapter on web applications and frameworks, but I’m afraid that might be an even bigger can of worms. So it’s probably wise the author left it closed.
Many of the advanced techniques went over my head on my first read. The information is very dense in that particular chapter (8), but I’m pretty sure they will make a lot more sense when I return to the chapter after getting some more Python experience. They are advanced after all.
As in the first part, the examples are what give this book something extra. Many examples are used to show the difference between different concepts. Several chapters (for instance, Chapter 14 about parsing) demonstrate a number of different techniques to achieve the same result. This way you get a very good feeling of why you might prefer one technique over another for certain problems.
The book itself
To end this review, I have a few smaller notes on the structure/layout of the book itself.
The book covers both versions 3.0 and 3.1 of the programming language. Specific information for one of the two versions is clearly marked in the margin. If you know Python 3.0, you could quickly scan the book for changes. But I doubt you’d use this specific book as a guide to learn the new tricks of Python 3.1. I think there are probably better options if this is your only goal.
The margin also includes cross-references between chapters. This is a nice addition that is useful if you're searching a solution to a specific problem, but don't know exactly where to look. It’s almost hyperlinks for books.
If you're just learning Python, you'll appreciate the sidebars throughout the chapters. They introduce you to some concepts that will be explained in detail in later chapters. This allows you to build fully functioning programs without having to skip back and forth between chapters.
Conclusion
I really liked this book. Combining theory and well-explained examples, this is one of the best ways an experienced programmer can learn Python. And that’s exactly the type of person that will enjoy this book. If you already know Python, I don’t think you’ll find enough detail to use this book as a reference. And if you’ve never programmed before, most programming concepts are introduced a little too fast. If, however, you’re experienced in Java, C# or whatever programming language and you want to learn Python, this book will not disappoint.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)




