ruby %w equivalent
hg
hg at nospam.com
Mon Sep 25 16:17:04 EDT 2006
MonkeeSage wrote:
> hg wrote:
>> Why would they want to make such an obscure API ? ... didn't they have
>> Python to learn from (I am truly amazed - nothing cynical ...just ...
>> why ?!!!!)
>
> In ruby there are several special literal notations, just like python.
> In ruby it goes like this:
>
> %{blah} / %Q{blah} # same as "blah" but igornes " and '
> %q{blah} # same as 'blah' but no interpolation
> %w{blah blah} # same as "blah blah".split
> %r{blah} # same as /blah/
> %x{ls} # same as `ls`
>
> Sometimes they are very useful, and sometimes they are cumbersome. It's
> up to the programmer to implement them effectively.
>
> Regards,
> Jordan
>
I am certain Ruby is a very effective language (I read much good stuff
about it) ... it's just that I cannot comprehend why a "new" language
would attempt so hard to look like assembly.
Regards,
hg
More information about the Python-list
mailing list