[Tutor] Question regarding syntax
Michael Klier
chi at chimeric.de
Wed Jul 11 18:17:42 CEST 2007
Dave Kuhlman wrote:
> On Wed, Jul 11, 2007 at 11:03:18AM -0400, John Morris wrote:
> > I'm editing some code from Mailman and seeing:
> >
> > legend = _("%(hostname)s Mailing Lists")
> >
I am no python pro but I guess that funtction _() ist just a wrapper
function around gettext.gettext from the gettext module (used for
localization). I`ve seen that in lots of places and I think that`s
common practise (don`t beat me if I am wrong ;-)).
> Mailman is a great product. But that bit of code is not, I think,
> very good code.
Even the python gettext docs [1] use it that way.
[1] http://docs.python.org/lib/node732.html
Kind Regards
Michael
--
Michael Klier
mail: chi at chimeric.de
www: http://www.chimeric.de
icq: 206179334
jabber: chi at jabber.shipdown.de
key: http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.python.org/pipermail/tutor/attachments/20070711/ceb29548/attachment.pgp
More information about the Tutor
mailing list