Python -Vs- Ruby: A regexp match to the death!

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Aug 9 10:21:51 CEST 2010


On Mon, 09 Aug 2010 00:29:19 -0700, rantingrick wrote:

> On Aug 8, 8:15 pm, Steven D'Aprano <st... at REMOVE-THIS-
> cybersource.com.au> wrote:
> 
>> In Ruby they decided to be more general, so you can define whatever
>> heredoc you need to quote whatever literal string you need. That's not
>> bone-headed.
> 
> Devils Advocate!
> 
> PS: Man you're irb main was so full of cobweb i could barley see the
> code... haa... haaaa... hachew!. ;-)

irb's default prompt is a bit too verbose for my tastes, but Python 
allows you to customise its prompt too. You'll often see people here 
posting copy/pastes with a customised prompt, so obviously some people 
like that sort of thing.

Me, my biggest gripe with the interactive interpreter is that using >>> 
as a prompt clashes with > as the standard quoting character in email and 
news, but Guido has refused to even consider changing it.

And that it's quite finicky about blank lines between methods and inside 
functions. Makes it hard to paste code directly into the interpreter.

And that pasting doesn't strip out any leading prompts. It needs a good 
doctest mode.


-- 
Steven



More information about the Python-list mailing list