Problem with mixing doctest with gettext _()
Pierre Rouleau
prouleau at impathnetworks.com
Fri Feb 27 07:45:31 EST 2004
Skip Montanaro wrote:
> Pierre> I tried to define a _() function when testing with the code
> Pierre> below but the doctest still fails. The following code is at the
> Pierre> end of my utstring.py module
> ...
>
> I suspect it's because your dummy _ is not in builtins. Why not just call
> gettext.install() where you are currently defining _?
>
Skip, this looks like the way to go.
I was trying to avoid it because the translation files for these library
modules are constructed at the application level somewhere else. But I
was also considering creating a translation library for these module, so
I guess that is one more incentive to do so...
Thanks
Pierre
More information about the Python-list
mailing list