gettext and __doc__ for class methods?

Roc Zhou chowroc.z+l at
Fri Jun 22 05:49:10 CEST 2007

from gettext import gettext as _

__doc__ = _("""module docstrings""")

class test:
    __doc__ = _("""class docstrings""")
    def __setattr__(self, attr_name, value):
        _("""class method docstrings""")

But I found when the module and class docstrings take effect(must use
__doc__ to specify it), the class-method gettext docstrings takes no effect,
    def __setattr__(self, attr_name, value):
        """class method only english docstrings"""
has effect.

So any suggestions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list