Core Python Programming

Author: Wesley J. Chun
Publisher: Prentice Hall PTR
Price: $44.99 US
ISBN: 0-13-026036-3
Reviewer: Michael Baxter
Finally, a book good enough to be both a textbook and a reference on the Python language now exists. Part of Prentice Hall's PTR Core Series, this book works well as a first Python textbook for computer science students, while also being thumbable for work-a-day use by Python programmers.
The book divides Python into two main parts. In Part I, about 500 pages explain the rudiments of Python: how to program in Python, the syntax, data types and key language features, all cleanly divided into 14 chapters. Each chapter is compartmentalized yet is also incrementally linked to the others. Part II covers six different advanced topics in as many chapters in a little under 200 pages. In Part II, the advanced chapters accomplish what most Python books fail to do: show you integrated working examples of how the language is used to solve real-world problems.
For students, Part II allows you to apply directly what you learn from Part I, moving beyond just pushing what might initially be abstract symbols and syntax. For developers or programmers, Part II is a very nice HOWTO, which is strongly backed up by Part I as a language reference. For all users, the book invites exploration and satisfies your curiosity through modifying the copious examples. Some in-depth examination will illustrate these points.
To introduce the basics, Part I has chapter topics titled “Welcome to Python!”, “Getting Started”, “Syntax and Style”, “Python Objects”, “Numbers”, “Sequences: Stings, Lists, and Tuples”, “Dictionaries”, “Conditionals and Loops”, “Files and Input/Output”, “Errors and Exceptions”, “Functions”, “Modules”, “Classes and OOP” and “Execution Environment”.
The order of topics in Part I really simplifies learning Python, especially if this is your first computer language. If you've ever had a programming class before and used a text that has exercises where you were forced to write code that did some silly language-specific action, you'll be pleased to know that this is not that kind of book. Plentiful, practical examples are used as each topic develops; the exercises are a lot more about exercising your creativity rather than some didactic language feature. Consider this one of the “fun” computer language books.
Because of the excellent depth presented in the introductory topics, the material is also of value to practicing Python programmers. For instance, most language books have tables and lists about features that are broadly discussed in the text. This book goes much further. The standard types in Python are explained compellingly in terms of storage model, update model and access model. These three simple concepts explain all of the possible interactions of data types in the language, doing more to help understanding than dozens of pages of prose. And, there are other examples of this kind of thought-provoking mastery of Python. A flowchart explains how Python does numerical coercion and is much easier to follow than any table or list. The best explanation ever achieved of how Python does slicing of sequence objects is shown using cartoons of soccer players. A lot of the power of Python comes from lists and dictionaries. Interestingly, explanations are given for what these objects do not do, as well as for their capabilities. These pages should be earmarked for reference use.
In Part II, we encounter the advanced topics. Again, this is where the book excels: it actually shows you how to do the programming for specific application areas involving “Regular Expressions”, “Network Programming”, “Multithreading Programming”, “GUI Programming with Tkinter”, “Web Programming” and lastly, “Extending Python” with alternative, compiled languages. In contrast to the interlinked development of Part I, the chapters in Part II are more individually self-supporting. They can be used as one has an interest or need for the information. The chapter on multithreading, in particular, is one of the only complete HOWTO developments on this topic.
Mention must be made of the valuable appendices and the index. Appendix A provides answers to selected exercises, for self-checking or class use. Appendix B contains one of the most comprehensive bibliographies of print and on-line references on Python. The operators in Python are conveniently collected in one place in Appendix C. The book keeps you completely up-to-date with Appendix D, which previews the new language features of Python 2.0. The index is impressively comprehensive at 17 pages in length.
The two-part division of the material feels very appropriate. For use as a textbook, the pacing and thoroughness are more than adequate. As a reference book, the clean division of the subject, plus a good index, allow rapid finding of any topic. A wide variety of examples are used in each chapter. This markedly increases the likelihood that something of salience matches your needs as a programmer. And while opinions vary, I tend to prefer books that offer a CD-ROM of multiplatform binaries and sources, as this one does.

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- New Products
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




3 hours 58 min ago
14 hours 39 min ago
20 hours 25 min ago
20 hours 42 min ago
22 hours 35 min ago
1 day 29 min ago
1 day 7 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 15 hours ago