[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Python gettext

From: Horst Herb
Subject: Re: [Gnumed-devel] Python gettext
Date: Mon, 2 Sep 2002 03:49:12 +1000
User-agent: KMail/1.4.6

On Sun, 1 Sep 2002 05:35 pm, Karsten Hilbert wrote:

> installs the function _() in the global (!)
> namespace so after it is imported by a top level module (such
> as no other modules need to worry about even
> importing it anymore and just wrap their strings.

I would strongly encourage to include gmI18N in each module!

Reason: each module should have a testing function in the section "if __name__ 
== "__main__". 
Preferrably (for debugging purposes) this should be achieved by calling a 
single function from without the __main__ section. Otherwise, when importing 
the module from within the interactive interpreter, it would be hard to start 
the testing.
As no module gets imported twice, and the testing whether a module has been 
imported already is just one dictionary lookup, there is virtually no penalty 
in just importing gmI18N from any module using strings.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]