I just had LocalFS break under Zope 2.6.4 with Python 2.3.4 due to a "missing docstring". What are the current rules? Must everything (procedures, methods, classes, modules) have docstrings? Even when running with Z_DEBUG_MODE set to "yes".
On Thu, Jul 01, 2004 at 08:34:13PM -0700, Dennis Allison wrote:
I just had LocalFS break under Zope 2.6.4 with Python 2.3.4 due to a "missing docstring". What are the current rules? Must everything (procedures, methods, classes, modules) have docstrings? Even when running with Z_DEBUG_MODE set to "yes".
All methods you want to gets published should have at least empty docstring and do not have a name beginning with underscore: class Foo: def pulishme(self): """ """ def donotpublishme(self): pass def _donotpublishmealso(self): """ """ -- 暮 This host is a black hole at HTTP wavelengths. GETs go in, and nothing comes out, not even Hawking radiation. -- Graaagh the Mighty on rec.games.roguelike.angband
Thanks. What about classes & modules? Should Foo, in you example, have a doc string? What about the module that Foo belongs to? On Fri, 2 Jul 2004, Bogdan M. Maryniuck wrote:
On Thu, Jul 01, 2004 at 08:34:13PM -0700, Dennis Allison wrote:
I just had LocalFS break under Zope 2.6.4 with Python 2.3.4 due to a "missing docstring". What are the current rules? Must everything (procedures, methods, classes, modules) have docstrings? Even when running with Z_DEBUG_MODE set to "yes".
All methods you want to gets published should have at least empty docstring and do not have a name beginning with underscore:
class Foo: def pulishme(self): """ """
def donotpublishme(self): pass
def _donotpublishmealso(self): """ """
-- 暮
This host is a black hole at HTTP wavelengths. GETs go in, and nothing comes out, not even Hawking radiation. -- Graaagh the Mighty on rec.games.roguelike.angband
On Fri, Jul 02, 2004 at 10:02:58AM -0700, Dennis Allison wrote:
Thanks. What about classes & modules? Should Foo, in you example, have a doc string? What about the module that Foo belongs to?
In general, no, but this is good style either. -- 暮 This host is a black hole at HTTP wavelengths. GETs go in, and nothing comes out, not even Hawking radiation. -- Graaagh the Mighty on rec.games.roguelike.angband
Dennis Allison wrote:
Thanks. What about classes & modules? Should Foo, in you example, have a doc string?
No, but it can't hurt, can it? ;-) What about the module that Foo belongs to? No. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
bo@bitute.b4net.lt -
Chris Withers -
Dennis Allison