which feature of python do you like most?

Thomas Guettler niemand.leermann at thomas-guettler.de
Tue Nov 8 11:29:09 EST 2005


Am Tue, 08 Nov 2005 04:21:52 -0800 schrieb zelzel.zsu at gmail.com:

> which feature of python do you like most?
> 
> I've heard from people that python is very useful.
> Many people switch from perl to python because they like it more.

It gives you a stacktrace if something is wrong. Exceptions are built-in.

Example:
Perl: 
  open FD "myfile.txt" || or die "Can't open file $!";

Python:
  fd=open("myfile.txt")

If the file can't be opened, then you get a nice traceback.

If you are programming/debugging cgi with cgitb you can even get a HTML
page full of important information.

Example:
  http://www.thomas-guettler.de/vortraege/python/cgitb.html

I have a page why I switched from perl to python, but it is in german:

http://www.thomas-guettler.de/vortraege/programmierung/einfuehrung.html#link_5


Objectoriented Programming in Perl is no fun. I switched from perl to
python because the emacs-perl mode was not able to understand all
those backslashed anymore (the code was correct).


 Regards,
   Thomas

-- 
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: niemand.leermann at thomas-guettler.de




More information about the Python-list mailing list