Linked by Eugenia Loli on Tue 19th Sep 2006 17:38 UTC, submitted by TheMonoTone
General Development "It's been nearly 20 months since the last major release of the Python programming language, and version 2.5 is probably the most significant new release of Python since 2.2. The latest release includes a variety of additions to the standard library, language extensions, and performance optimizations." More links here.
Thread beginning with comment 163761
To read all comments associated with this story, please click here.
aesthetic and practical language
by project_2501 on Tue 19th Sep 2006 23:06 UTC
Member since:

Every language has its own space - each language will have a part of the larger problem space to which it is best suited. This is useful to understand, and it nullifies the common language preference arguments.

However, python I believe has the following strengths:

* not too encumbered by syntax
- many programmers realise that it is one of those languages where the first iteration or protoype works without the need to go and fix language syntax errors.

* has a good representation
- compared to some languages the leap between the human brain idea and the actual code is small. consider the difference between System.out.println("Hello World"); and simply print "Hello World" ... iteration is also particularl natural - check it out.
- for me, most of my problem space is now carved u p betweem C (performance, footprint) and Python.

* standard distribution has many useful libraries and functions
ths is useful becuase if there is one official smtp library, then it is more likely to be mature and more likely to be bug-fixed. this is the opposite of libraries where you extend functionality from a less trusted source.
you're not reinventing the wheel with libraries to do useful and very practical tasks - from smtp to http, from base64 encode to portable file operations. you'll even find that different layers are exposed - you have a high level "www" lib, or a lower level "http" lib or even lower "socket" .. and so on.

* portable and available multi-platform.
you won't have too much trouble obtaining python and running your code on linux, bsd, solaris, macos .. even windows.

* readable ad understandable code
this is important. wen you read your own code months later, or pass your code to someone else if it much more likely to be understood than other languages.

I often recommend python to first time programmers. you'll be amazed how many non-technical people enjoy processing text data files, or outputting numbers to be plotted by a graph plotter, or even printing out the times tables! newcomers are amazing at the seemingly easy power and possibilities with programming.

python is great - but it could be greater:

* a serious IDE - the "idle" IDE is very weak and not a good advertisement for python. we need something like netbeans/eclipse is for java - code completion, library introspection and so on.

* threading
i know that python has a very nice and portable threading model - and for most applications its perfect and brings easy threading to more developers. however, this threading is "in the python interpreter" achieved with a granularity of python microcode. it would be useful to have additional libraries for OS/kernel provided threads.
essentiall a python interpreter running threaded code does not make use of multiple CPUs or cores.

* asynchronous model
the Twisted Networking framework is an attempt to provide asynchronous networking at various networking application layers - however the code is ugly and the dcumentation is not in the spirit of the usual accessible, clear python philosphy.

by the way I just wrote a quick script which iterates loops with a depth of three:
python 2.4.3 = 16.205 seconds
python 2.5 = 12.058 seconds
that's a 34% increase!

Reply Score: 5

siti Member since:

Good write up!

Eclipse has pydev which is wonderful for python work ;) . It has autocompletition, debug support, syntax highlighting, outline and all the other advantages that eclipse offers ;)

That performance increase is really good. Python is still a slow language but for RAD it's awesome. It would be interesting to see if the cpython beats Ironpython in peformance now (this will prove even more that .net is only designed for imperative and statically typed code).

Reply Parent Score: 2