[I18n-sig] Re: pygettext.py extraction of docstrings

Barry A. Warsaw barry@wooz.org
Wed, 20 Jun 2001 18:07:52 -0400


>>>>> "MvL" == Martin v Loewis <martin@loewis.home.cs.tu-berlin.de> writes:

    >> Cool.  Let me know if I can help.  I'm relying on pygettext
    >> quite heavily in Mailman, so I think it's pretty solid (latest
    >> revision is pygettext.py 1.20).

    MvL> Personally, I think xgettext should itself recognize
    MvL> docstrings. The po-utils already support extracting doc
    MvL> strings, and I added support to extract strings with __doc__
    MvL> from C modules as well.

    MvL> Maybe I'll look into contributing these features to GNU
    MvL> gettext with native code.

Cool, just be sure to make docstring extraction optional.  E.g. it
makes sense for Mailman's bin/* scripts where the module docstring
doubles as usage text, but it doesn't make much sense for most plain
old module docstrings.

OTOH, maybe we should define a convention in the docstring to indicate
that it's ripe for extraction.  E.g. an _ as the first character in
the docstring...

-Barry