Danek Duvall-san wrote (11/ 3/08 08:30 AM):
> which maps the contents of the symbols "a" and "b" into the string at the
> two "%s" locations. Thing is, if one language needs "a" before "b" and
> another language needs "b" before "a", this method is useless. So there's
> another way that uses a dictionary instead of a tuple:
>
> "%(a)s %(b)s" % {"a": a, "b": b}
>
> which does precisely what the previous one did, except that you can now
> localize the string to be "%(b)s %(a)s" to reorder the strings.
I agree it's better. Let's use this if you add new strings. I just minded typo.
>
> Fujiwara is taking a cheap and easy way to this by using vars() -- if the
> dictionary you pass to the expandos has more elements than are used, those
> other elements are ignored. Thus if "a" and "b" are in the current
> namespace, the previous example could be written as
>
> "%(a)s %(b)s" % vars()
>
> I don't like this as much as making it explicit, though. If you remove one
> of the names, the error you get back is less indicative of the problem --
> you get a KeyError on the missing name, rather than a NameError.
>
> Danek
>
I'll ask translation integrations with another mail. Let's say now is a UI
freeze.
Especially I spent much time to track the change of 'pkg help' yesterday and
today.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss