1. Computing

Object-Oriented Programming in Python

In a Nutshell

About.com Rating 3.5 Star Rating

From , former About.com Guide

Object-Oriented Programming in Python is a good introductory textbook for learning object-oriented programming using the Python language. The authors are both computer science professors at St Louis University. The book, therefore, is oriented to preparing the reader for future learning in computer science. It takes the reader from knowing comparatively little to programming chat clients and similar advanced topics and rounds off with a transition guide to compiled programming languages.

Sections

The book is divided into three sections: fundamental topics, advanced topics, and a series of appendices. The first section introduces several basic concepts of programming. The authors start with laying out the theoretical background to computer programming and add to that classes, I/O, and inheritance. A substantial plus in this first section is a chapter on good software practices. The authors cover naming conventions, documentation, encapsulation, unit testing, and error-checking as they show how to develop a game of Mastermind. Such practices are not always covered in introductory texts, so this is a bonus for the reader.

Custom Graphics Package?

Also in this section, the authors introduce their own graphics package, cs1graphics. Given the number of graphics packages available for Python, one wonders why. In the first chapter, the authors discuss a hierarchy for a set of drawable objects. Evidently, the available packages (e.g., wxPython, Tkinter) do not adequately foot the bill. The result of requiring a student to use a non-standard package, however, is that the student gets steeped in a way that is not widely accepted. This is obviously problematic - especially in the third chapter of the book. The consequences may be overcome by implementing the same programs using the likes of Panda3d or wxPython.

Advanced Topics

Where the first section covers basic Python programming and core programming concepts, the second section goes on to cover more advanced programming skills. Among the advanced topics covered in the second part of the book are interrelationships between objects, recursion, data structures, and basic sorting algorithms. The section ends with a chapter on network programming.

Appendices

The book contains four appendices. The first contains an overview of IDLE, Python's integrated development environment. The second appendix offers a transition guide for moving from Python to Java or C++. This obviously betrays the (in my opinion, erroneous) view that Python is something one learns en route to compiled languages. The third appendix contains the solutions to the exercises which end each chapter. Finally, the authors include a glossary of major computing terms.

©2013 About.com. All rights reserved.