Beginning programming with Python

Janos Blazi jblazi at netsurf.de
Tue Nov 16 16:17:01 EST 1999


There is one thing though in Python I do like at all!
The language is not as versatile as PERL when loops are concerned. I very
much like the construction

  REDO ... UNLESS

or something like this. It is a pity Python does not have this sort of
things.

Janos B.



Bill Anderson <banderson at boi.hp.com> schrieb in im Newsbeitrag:
3831A4EB.76FF32AF at boi.hp.com...
> 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 t.py
> > def f():
> >   print "started"
> >   x = 128
> >   x.foo()
> >
> > Let us import it in the Python interpreter:
> > >>> import t
> > >>>
> > You can see thet the interpreter compiled t.py 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
> testers.
>
> > 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
>
>
> --
> Bill Anderson Linux/Unix Administrator, Security Analyst
> ESBU (ARC) banderson at boi.hp.com
> My opinions are just that; _my_ opinions.






More information about the Python-list mailing list