Author: H. Bhasin
A "Self-Teaching Introduction" to Python Basics. Is this a good place to start?
Python is a good language for the beginner because you can mostly just get on with programming. The subtle details are for the expert and can mostly be ignored until you graduate. However, this doesn't free the author of a beginner's book from knowing what is further down the road and using that knowledge to guide the reader through the first steps in the right direction. In this particular book, however, Python is treated as if it was just another language and a few differences are pointed out - mostly to C++ and Java. It is the sort of book you would get if you handed a C++ or Java programmer the task of explaining Python at a fairly basic level. This is mostly good enough for the obvious things that have to be learned such as if statements and flow of control but it misses many of the subtle ideas. You might say "but this is a basic Python book" and hence subtle ideas can be ignored. The problem with this is that some of the ideas are also very basic and missing an opportunity to explain them makes programming in the language more difficult than it needs to be. This doesn't mean that it is a useless book - you may not want to be a Python expert and are happy with a "language-general" approach.
Chapter 1 gives an introduction to Python including its history and how to install it using Anaconda. No IDE is used other than Idle and this make it harder for the beginner in my opinion. There are some questions as the end of the chapter some of which I don't think can be answers after reading the chapter.
Chapter 2 is called Python Objects which is accurate, but it would be better titled as Basic Data Types. General Python objects aren't considered , instead it is restricted just to numbers, strings, Lists, Tuples and so on. Chapters 3 and 4 are on basic control constructs - ifs and loops.
Chapter 5 introduces functions, but fails to make clear that Python functions are objects. The section on scope is an example of how not knowing the inner philosophy of a language can result in a less than clear understanding. The point is made that you can't access a global variable if you assign to a local variable of the same name, but the explanation is far from clear and there is no mention of the use of the global keyword. The examples are also odd in that they have lines of code that don't add anything. The chapter ends with a section on recursion - so much to talk about, but instead we deal with a topic that can be completely ignored by the beginner.
Chapter 6 deals with iterators, generators and comprehensions. Chapter 7 with file handling and Chapter 8 is on strings. Only at Chapter 9 do we reach object-oriented programming and this is enough to confuse anyone as it takes a standard approach to objects which Python doesn't take. Chapter 10 deals with inheritance and basically says that multiple inheritance is bad and makes no attempt to explain it. The chapter is also unclear about bound and unbound methods. Chapter 12 covers the trivial topic of operator overloading and Chapter 13 covers exception handling.
From here the book moves away from teaching you Python and uses Python to teach you classic computer science. Chapter 14 is the first of four about data structures and algorithms and covers arrays, something Python lacks. Chapter 15 is about stacks and queues, Chapter 16 is about linked lists and Chapter 17 is about trees. This is a very standard approach but misses out a key Python data structure - the Dictionary.
Chapter 18 moves back to a more Python topic NUMPY, but this is hardly basic Python. Chapter 19 is about using MATPLOTLIB and Chapter 20 is about image processing. I'm not sure why these chapters are in a book on "basic" Python but you might find them useful.
If you want to be a Python wiz, or even to vaguely have a grasp of what Python is all about, this is not a good place to start. It reads like a rewrite of a book about another language adapted to use Python - but without really embracing the Pythonic ways of doing things. It also claims to be about basic Python, but it covers more advanced topics like recursion, that are beyond this remit.This raises the question of why other advanced topics that are important in Python - closure and the fact that functions are first class objects - are not introduced, and it completely avoids multiple inheritance which is a key feature of Python. About a third of the book is about non-Python topics such as the classical theory of data structures. The final three chapters are on more advanced application areas that a typical beginner might or might not find interesting.
It is also more like a textbook than a self study guide. If you are planning to teach a class you might be able to get something out of it that you can use. However, I often found the explanations difficult to understand and the examples mostly weren't helpful to my understanding of Python.
|Last Updated ( Wednesday, 13 February 2019 )|