Show TOC | Frames
My Desktop | Account | Log Out | Subscription | Help
Programming > Core Python Programming > 1. Welcome to Python! > Features of Python See All Titles
< BACK Make Note | Bookmark CONTINUE >
156135250194109153048020212211141067213148107242221098032071132043232153133122184040075052
Features of Python
Although practically a decade in age, Python is still somewhat relatively new to the general
software development industry. We should, however, use caution with our use of the word
"relatively," as a few years seem like decades when developing on "Internet time."
When people ask, "What is Python?" it is difficult to say any one thing. The tendency is to
want to blurt out all the things that you feel Python is in one breath. Python is
(fill-in-the-blanks here). Just what are some of those blanks? For your sanity, we will
elucidate on each here… one at a time.
High-level
It seems that with every generation of languages, we move to a higher level. Assembly was a
godsend for those who struggled with machine code, then came FORTRAN, C, and Pascal,
all of which took computing to another plane and created the software development industry.
These languages then evolved into the current compiled systems languages C++ and Java.
And further still we climb, with powerful, system-accessible, interpreted scripting languages
like Tcl, Perl, and Python. Each of these languages has higher-level data structures that
reduce the "framework" development time which was once required. Useful types like
Python's lists (resizeable arrays) and dictionaries (hash tables) are built into the language.
Providing these crucial building blocks encourages their use and minimizes development
time as well as code size, resulting in more readable code. Implementing them in C is
complicated and often frustrating due to the necessities of using structures and pointers, not
to mention repetitious if some forms of the same data structures require implementation for
every large project. This initial setup is mitigated somewhat with C++ and its use of
templates, but still involves work that may not be directly related to the application that
needs to be developed.
Object-oriented
Object-oriented programming (OOP) adds another dimension to structured and procedural
languages where data and logic are discrete elements of programming. OOP allows for
associating specific behaviors, characteristics, and/or capabilities with the data that they
execute on or are representative of. The object-oriented nature of Python was part of its
design from the very beginning. Other OO scripting languages include SmallTalk, the
original Xerox PARC language that started it all, and Netscape's JavaScript.
Scalable
Python is often compared to batch or Unix shell scripting languages. Simple shell scripts
handle simple tasks. They grow (indefinitely) in length, but not truly in depth. There is little
code-reusability and you are confined to small projects with shell scripts. In fact, even small
projects may lead to large and unwieldy scripts. Not so with Python, where you can grow
http://safari.oreilly.com/main.asp?bookname=0130260363&snode=39 (1 of 4) [6/2/2002 12:16:20 AM]