As we’ve seen in this book, Python is a multifaceted tool, useful in
a wide variety of domains. What can we say about Python to sum up here? In
terms of some of its best attributes, the Python language is:
General purpose
Object-oriented
Interpreted
Very high level
Openly designed
Widely portable
Freely available
Refreshingly coherent
Python is useful for both standalone development and extension work,
and it is optimized to boost
developer productivity
on many fronts. But the real meaning of Python is really up to you, the
reader. Since Python is a general-purpose tool, what it “is” depends on
how you choose to use it.
I hope this book has taught you something about Python, both the
language and its roles. Beyond this text, there is really no substitute
for doing some original Python programming. Be sure to grab a reference
source or two to help you along the way.
The task of programming computers will probably always be
challenging. Perhaps happily, there will continue to be a need for
intelligent software engineers, skilled at translating real-world tasks
into computer-executable form, at least for the foreseeable future. After
all, if it were too easy, none of us would get paid. No language or tool
can obviate the hard work of full-scale programming entirely.
But current development practice and tools make our tasks
unnecessarily difficult: many of the obstacles faced by software
developers are purely artificial. We have come far in our quest to improve
the speed of computers; the time has come to focus our attention on
improving the speed of development. In an era of constantly shrinking
schedules, productivity must be paramount.
Python, as a mixed-paradigm tool, has the potential to foster
development modes that simultaneously leverage the benefits of rapid
development and of traditional languages. While Python won’t solve all the
problems of the software industry, it offers hope for making programming
simpler, faster, and at least a little more enjoyable.
It may not get us off that island altogether, but it sure beats
bananas and coconuts.
A Morality Tale of Perl Versus Python
(The following was
posted to the
rec.humor.funny
Usenet
newsgroup by Larry
Hastings
, and
it is reprinted here with the original author’s permission.)
This has been percolating in the back of my mind for a while. It’s
a scene from
The Empire Strikes Back
, reinterpreted
to serve a valuable moral lesson for aspiring
programmers
.
EXTERIOR: DAGOBAH—DAY
With Yoda strapped to his back, Luke climbs up one of the many
thick vines that grow in the swamp until he reaches the Dagobah
statistics lab. Panting heavily, he continues his exercises—grepping,
installing new packages, logging in as root, and writing replacements
for two-year-old shell scripts in Python.
YODA: Code! Yes. A programmer’s strength flows from code
maintainability. But beware of Perl. Terse syntax…more than one way to
do it…default variables. The dark side of code maintainability are they.
Easily they flow, quick to join you when code you write. If once you
start down the dark path, forever will it dominate your destiny, consume
you it will.
LUKE: Is Perl better than Python?
YODA: No…no…no. Quicker, easier, more seductive.
LUKE: But how will I know why Python is better than Perl?
YODA: You will know. When your code you try to read six months
from now.
A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.