Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Developer Reading List

, July 01, 2014 The best summer reads.
  • E-mail
  • Print

Python Pocket Primer

by Oswald Campesato

There are three good primers in Python. The classic Learning Python by Mark Lutz, Zed Shaw's opinionated set of learning exercises, and for the complete novice, Think in Python. While all three are good reads, they all have specific limitations. Lutz's book is 1600 pages(!), Shaw's book teaches by assigning numerous small projects, and the Think volume is truly aimed at non-programmers. The Python Pocket Primer fills the yawning need for a concise guide written for programmers who need to get up to speed quickly on the language. It is supremely hands-on and wastes little time on non-essentials: From the opening chapter on setting up an environment, it speeds along with topic after topic explained clearly with supporting code and examples from the REPL. By page 60, you're into Python collections; by page 100, you've covered file handling; by page 140, you've worked with JSON. The remaining 50 pages cover more-involved topics such as working with databases and even some minimal concurrency.

The only missing topic is the set of considerations around building large projects in Python. Given that this book is a primer, though, this omission seems entirely reasonable.

Unlike other books that teach languages via the code snippets and REPL/console listings, this book seems to get the balance between explanation and demo exactly right. As a result, you can cruise along and quickly get to the point of using Python ably. The good explanations and the care with which they build successively on each other mean that it's comparatively easy to retain just-learned material as you push forward into new topics.

In sum, I think this unassuming little book is one of the fastest ways of getting up-to-speed in Python. And at $20, it's truly a bargain.

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.