gettext and __doc__ for class methods?

Roc Zhou chowroc.z+l at gmail.com
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,
only:
    def __setattr__(self, attr_name, value):
        """class method only english docstrings"""
has effect.

So any suggestions?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070622/6595cf80/attachment.html>


More information about the Python-list mailing list