REVIEW - Sams Teach Yourself Python in 24 Hours


Sams Teach Yourself Python in 24 Hours


Ivan Van Laningham



Sams Publishing (2000)




Francis Glassborow


August 2000



Let me address several of my grouses with books in this series and ones with a similar title. The cover claims '24 proven one-hour lessons'. Without question there are indeed 24 sections to this book but to call them hours is rather like the Earth being created in seven days. Some of the early sessions will require quite a bit of quiet coffee drinking to stretch them out to an hour, while a couple of the later ones will require the coffee to keep you going until you have finished.

Rather more seriously there is the issue of screen shots. In this book they are not decorative but include vital information for the understanding of the material that you are studying. Shots of a standard 80 character MS Window spanning half the printing width of a generously margined page results in a type face that is about 4pt. For reference this page is printed in 9pt. And, of course, screen shots use white type on a black background. That is not acceptable.

I find it sad that a potentially good book is marred by such silliness. The author has taken a lot of care to introduce the newcomer to Python. I think the result works quite well whether you are a novice programmer or a professional pushed for time. Of course the professional is going to start noticing some of the peculiarities of the language which the novice will just take for granted. There is the issue of the way Python uses source code layout as a syntactic element (indentation matters), and the way that Python identifiers are strictly untyped with the interesting consequence that there is no concept of scope and the lifetime of objects is at best tenuous. However I notice that one of the articles submitted for this issue already tackles some of these things so I will leave you to read about them there.

The book is divided strictly into three parts. The first part introduces you to the basics of programming in eight, stretched, hours. Each chapter includes a summary, workshop and exercises. Experienced programmers might just check themselves out by skimming these chapters and trying the workshops and exercises to verify that they are on track. Novices will need to discipline themselves to get a firm grip of this early material so that they will build on rock rather than sand.

The next eight hours tackle objects, classes, making components and related topics. It is here that you will need a slow running clock even if you are fairly experienced. You will also need to read very carefully if you are an experienced programmer to ensure that you grasp the significant ways that Python varies form other languages you already know. Novice programmers will need to remember that Python has very much its own approach and that the Python way of doing things is not the only true way. There are some deep things going on here and it is worth taking the time to see them clearly.

The last third of the book largely focuses on using Python with Tk. The last two chapters deal with writing a Mandlebrot Set program (a good example of how you can get reasonable speed even though Python is interpreted if you understand how to use the full range of tools available) and something on CGI work with Python.

Overall, if it were not for the terrible screen shots and uneven split over twenty-four sessions this would be an excellent book. I must, however, warn you that my knowledge of Python is nothing like my knowledge of C and C++ so there may be technical faults that I have missed. What I will say is that the code worked once I managed to extract the requisite information from the screen shots.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.