[I18n-sig] Re: pygettext dilemma
Barry A. Warsaw
barry@zope.com
Wed, 15 Aug 2001 02:31:41 -0400
>>>>> "MvL" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:
MvL> What's wrong with
MvL> _('No such list %(listname)s found on host %(hostname)s') %
MvL> locals()
MvL> No magic required; of course, this assumes that the variables
MvL> are either all globals or all locals - I wish vars() would
MvL> give me a dictionary of all variables (perhaps even including
MvL> the builtins).
Bingo! That's what I wish vars() would do to, and I want those
semantics, so I went with the _getframe() hack.
Plus, I got tired of writing trailing "% locals()" all over the place,
especially when they cluttered the code even more with long lines,
requiring continuation via extraneous paren grouping or backslashing.
Blah.
-Barry