Darmesh discusses his programming history, and finally ends up with the eternal question: “Python or C#”?
To me, the ultimate reason not to use Python is contained in this following interaction:
Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> exit
‘Use Ctrl-Z plus Return to exit.’
>>> quit
‘Use Ctrl-Z plus Return to exit.’
>>> ^D
File “”, line 1
♦
^
SyntaxError: invalid syntax
>>> ^ZC:\Documents and Settings\jb>
Yes, you read that right. Python *knows* what you want to do, and doesn’t do it. Instead, it tells you how to do it the right way.
I have to use Python because it has some nifty hooks into the R statistical programming language. But I won’t use it for anything else. If I need scripting, I’ll use Ruby, thank you very much. Because here’s what happens when I interact with the interactive ruby shell:
C:\Documents and Settings\jb>irb
irb(main):001:0> quitC:\Documents and Settings\jb>irb
irb(main):001:0> exitC:\Documents and Settings\jb>irb
irb(main):001:0> ^DC:\Documents and Settings\jb>
The only mechanism it doesn’t support, ironically, is ^Z + Enter
Yeah, I know they’re not apples-to-apples comparisons. And I’m sure there are people out there who love Python for its strict purity of behavior. But I am not one of them ![]()
Huh? ^D works fine for me (Linux, Python 2.4.4c1)
Comment by Jonathan Fors — March 7, 2007 @ 1:22 pm
That wasn’t the point. It was the “no, you’re doing it wrong, do it the right way” attitude that I despise.
Not because it made it harder to exit - that’s a nit. It’s the philosophical approach that I dislike. I think it’s reasonable to assume that if a language scolds you for how you want to exit, it will continue that scolding behavior in everything else it does.
This is not to say that Python is a bad language. It’s just a bad language for me.
Comment by jb — March 7, 2007 @ 2:00 pm
Very funny.
That kind of things are annoying (interpreter refusing to do what i want) but, for me it’s even more annoying cmd.exe FIXED size.
BTW have you tried ipython?
Comment by Nahuel — July 29, 2007 @ 2:40 pm
Hehe, you have a good attention to detail. Probably too much. I personally wouldn’t drop python because of this.
Comment by Holiguru — November 24, 2007 @ 10:55 pm