Thursday, July 19, 2007

The Only Thing I Hate About Python

Let's get this straight: I love Python. It's a fantastic language that maps particularly well to the way that I think. I find it so comfortable to work in that it seems like I have always known the language, even though it's been less than 2 years.

The only thing that I hate is a small detail about the python interpreter, to wit:


Brent-MacPro:~ $python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
'Use Ctrl-D (i.e. EOF) to exit.'
>>> exit
'Use Ctrl-D (i.e. EOF) to exit.'


So, the implementors of the interpreter decide to implement the 'quit' and 'exit' commands as indirections: "Oh, so you want to quit? Well you're doing it wrong, type some cryptic key combination instead of the absolutely clear command you just typed." Who thinks like that?

Argh. I type 'quit' or 'exit' Every. Single. Time. I. Need. To. Quit.

1 Comments:

Blogger Bg Porter said...

This came up in the Python developer mailing list (the list for the guys developing the language, not for people who use Python) not too long ago, and Guido brushed it off without a thought, which I thought was lame.

I use Python on Linux, OS X, and Win32, and I have to remember which OS I'm using vim in at that moment -- when I Ctrl+Z (which one needs to do on Windows) but I'm actually on Linux or OS X, all I do is put that process to sleep, not exit the interpreter.

This is also one of my big Python misfeatures, and it's sad that GvR doesn't want it fixed.

6:54 PM  

Post a Comment

<< Home