[LWN Logo]

Linux Weekly News
Daily updates
Linux Stocks Page
Book reviews
Penguin Gallery

Contact us

[Python Essential Reference cover]

Python Essential Reference

David M. Beazley

New Riders, 1999

Reviewed November 8, 1999

Despite the increasingly high profile of the Python programming language, good books on the subject have been frustratingly scarce. The original Internet Programming With Python has been out of print for some time, and O'Reilly's offering has been felt by many to be not quite up to the level of that publisher's other books. So a new book about Python is certain to raise some degree of interest. Happily, the Python Essential Reference by David Beazley is a high quality work which should be well received by Python hackers everywhere.

The book weighs in at just over 300 pages, which makes it positively skinny among the current crowd of technical books, which are seemingly sold by the pound. Those pages are packed however (partly due to the use of a relatively small font; some of the more visually-challenged readers may end up grumbling a bit). One thing this book does not have, unfortunately, is a lay-flat binding. Thus, to use it while working, one must put somebody else's 700-page tome over the book to hold it open.

The Python Essential Reference is a marvel of conciseness. The tutorial introduction is dispensed with in ten pages, yet manages to touch on all the important features of the language. The next 75 pages go over the language in detail. Again, the treatment is very concise, but also complete. Your reviewer, who considers himself a reasonably experienced Python hacker, learned several things while reading those chapters.

The key point, however, is that this is a reference book, not a tutorial. Python beginners would not be well advised to start with the Python Essential Reference. The information presented is terse, and assumes some familiarity with the language. It seeks to answer questions, not to teach from the beginning.

The bulk of the book is labelled "Appendix A." It is, of course, the library reference. Superficially, it looks much like the standard Python Library Reference; indeed, it is substantially derived from that manual. However, quite a bit of work has been done in reformatting the library manual, trimming out information, and filling in some areas.

This work has been more successful in some areas than others. For example, the discussion of the re (regular expression) module drops the details of how re.match() and re.search() differ from each other. From the book only, it would be hard to know which to use. Similarly, there is no discussion of the difference between the pickle and cpickle modules.

Most python hackers will likely end up keeping a copy of the Python Library Reference around, even if they refer to it much less often after getting the Python Essential Reference.

On the other hand, the discussion of the set of os modules (operating system services) has a much nicer organization. The documentation on threading is also much improved. These sections alone make the book worthwhile.

Sadly missing from the library reference is any coverage of the Tkinter module.

The book finishes with a brief but highly useful chapter on extending and embedding Python. Again, nobody will learn from scratch how to write a C extension module from this chapter. But those who have the basics will find the API reference material invaluable.

The book appears to have received a good deal of review and editorial attention. Python code, by its nature, is very susceptible to printing errors - printers have a hard time getting the indentation right. Your reviewer only found one such problem (on page 154). The book is nicely free of typographical and other errors.

The summary: the Python Essential Reference is exactly that: a reference book that looks to become essential very quickly. Python needed this book. Beginners should probably start with something else, but, once they reach the intermediate stage, they will want a copy close at hand.

--jc

Eklektix, Inc. Linux powered! Copyright 1999 Eklektix, Inc. all rights reserved.
Linux ® is a registered trademark of Linus Torvalds