[Numpy-discussion] ANN: NumPy/SciPy Documentation Marathon 2008
Tue May 20 18:04:22 CDT 2008
On Tue, May 20, 2008 at 5:55 PM, Jonathan Wright <email@example.com> wrote:
> Stéfan van der Walt wrote:
> > As for internationali(s/z)ation, we'll see who writes the most
> > docstrings.
> Indeed. There are some notes on the OLPC wiki at
> It seems to be just a question of adding at the top of add_newdocs.py
> from gettext import gettext as _
> ... and putting the docstrings in a _() function call, although perhaps
> I miss something important, like a performance hit?
Possibly a significant one. This could affect startup times, which I
am hesitant to make worse.
> This would catch
> everything in add_newdocs at least. It seems like a relatively minor
> change if you are overhauling anyway?
add_newdocs() could do that, but the usual function docstrings can't.
The rule is that if the first statement in a function is a literal
string, then the compiler will assign it func.__doc__. Expressions are
just treated as expressions in the function body and have no affect on
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion