Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

actually I hate to say it but one of the early (2006? 2005?) blog posts about the diff between Python and Ruby was that in Python's console, if you hit "q" or escape or ctrl-C or something, you get an error message like the 'source :rubygems' error message, which says "hit ctrl-D to escape." the blog post was saying this is basically the diff between the two languages, that Python would correct you if it knew what you wanted but you asked it the wrong way, whereas Ruby would just either support the most obvious option, or support both the most obvious option and the 'correct' option as well.

the idea in Ruby, and especially in Rails, is that if you know what the default is which most people are going to expect or try, you should support it. to say "we know you thought source :rubygems was the default, but it's not, you have to type it explicitly" is a little un-Ruby and a whole bunch un-Rails.



> in Python's console, if you hit "q" or escape or ctrl-C or something, you get an error message like the 'source :rubygems' error message, which says "hit ctrl-D to escape."

Ah, I think I know what you're talking about. I wasn't using Python back then, and I know exit() was added after that (the only way to leave the console before that was to Ctrl-D), but when you type "exit" in the console, Python responds:

    Use exit() or Ctrl-D (i.e. EOF) to exit
This bugs countless Python devs, myself included. It wouldn't be so bad if the console had no idea what "exit" was and responded with a NameError, but the fact that it realizes what you were trying to do but tells you to do something else inconsequentially different is a minor annoyance.


Anyone ever hit up Linus to add the 'git statsu' command? That would really help me out.


I'm assuming this is a (weak) joke, but in case you're genuinely wondering:

    git config --global alias.statsu status


You can create an alias for it:

git config –-global alias.statsu status

I have mine aliased to 'st'.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: