Beginning programming with Python

Bill Anderson banderson at
Tue Nov 16 13:39:39 EST 1999

Nemeth Miklos wrote:
> Janos Blazi wrote:
> > I have tried to use Perl in my teaching. It has a very powerful but alas!
> > not very simple syntax! To start with, my pupils used to forget the dollar
> > signs and Perl does not like that. So this year I shall use Python. We shall
> > see. Time will tell, if Python is really better. Maybe my pupils will forget
> > the indenting this time? There is actually nothing else you can forget in
> > Python.
> I am quite new in Python programming, and I was a bit :-( by understanding that
> Python does not have any (even optional) mechanism to enforce the usage of
> predeclared variables and functions. The complete lack of compile-time
> type-safety of Pythom may be a problem in large projects, which may be the most
> serious technical (ie non-marketing) obstacle to Python's becoming a widespread
> language like Java.
> Let us see an example:
> # Module
> def f():
>   print "started"
>   x = 128
> Let us import it in the Python interpreter:
> >>> import t
> >>>
> You can see thet the interpreter compiled to t.pyc (or t.pyo) but found no
> error.
> All typos (typing errors of variable and function names) will be detected ONLY
> at runtime! Python is perfect language to write programs fast, but with the
> cost of hordes of testers.

Disagree. I write many things in python, fast, and without hordes of

> However this may not be a big problem, because any
> piece of software should be thoroughly tested, to make sure that there are no
> semantic errors in the application. In the case of Python the applications
> should also be tested for "syntactic" errors.

As should _any_ language.

> In Python (just like in Smalltalk or in Perl, or in Tcl) there are a lot of
> things a programmer may forget.

Just like in C, java, C++ ... 

> I am on my way of becomming a Python programmer, but this should not prevent me
> from seeing the pitfalls of the language.
> A tutor must emphasize these gotchas of any programming language.
> Perl has a facility called 'use strict': it is also very poor compared to C++
> and Java strict static (ie compile time) system.
> The only really large project implemented in Python I found is Zope. Zope is a
> fantastic piece of software, and may be regarded as an evidence of my being
> totally wrong ;-).

yup :-)

> > I feel that it is the right language for teaching.
> Anyway, Python is a great language for teaching, but why to learn a language,
> which is good only for teachning?! This is the real question you (or the Python
> community) should answer!

Not possible. The question is predicated upon an assumption. You
incorrectly assume that Python is _only_ good for teaching. There are
quite a number or large companies that would disagree with you.


Bill Anderson 				Linux/Unix Administrator, Security Analyst
ESBU (ARC)				banderson at
My opinions are just that; _my_ opinions.

More information about the Python-list mailing list