What is the equivalent of Python's "%s" % "MyString"?

Yes, please, Nobu.

This will make I18N far easier than the current alternatives available.

-austin

···

-----Original Message-----
From: nobu.nokada@softhome.net [mailto:nobu.nokada@softhome.net]
Sent: 1 June 2004 21.51
To: ruby-talk ML
Subject: Re: What is the equivalent of Python’s “%s” % “MyString”?

Hi,

At Wed, 2 Jun 2004 03:43:42 +0900,
Sam Sungshik Kong wrote in [ruby-talk:102028]:

s = “My name is %(name)s and my age is %(age)d.” % {“name”:
“Sam”, “age”: 34}

I know that ruby has “#{name}” expression.
But that requires a variable named “name” in advance.
I want to bind the format string and data later.

I proposed that feature once in [ruby-dev:16351], though
rejected, but still I think that it would be useful for I18N.
Is it worth for RCR?


austin ziegler * austin.ziegler@evault.com