[Zope] Python: Class and method and documentation

Terry Kerr terry@adroitnet.com.au
Tue, 16 May 2000 09:19:14 +1000


the first method is missing a doc string!

methods in python products that you wish to call from the web need doc strings.

terry

Mickael Remond wrote:

> After a lot test, I think I found something strange in Zope (Or maybe it is
> too late in the morning...):
>
> I built a Python class to be used in a pure Python product. I wanted to add
> method but add a lot of trouble. Some of them was working and some of them
> kept going the "Ressource not found" Message.
>
> The answer is that it seems that you MUST document your method so that it can
> be properly manage by Zope:
>
>  For exemple the method:
>
>     def test(self):
>         return "test"
>
>  does not work, but:
>
>     def test(self):
>         """This is a test method"""
>         return "test"
>
>  does seem to work.
>
>  I need help. Could you confirm and explain me this _cryptic_ behaviour...
>
> --
> Mickaël
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--
Terry Kerr (terry@adroit.net)
Adroit Internet Solutions Pty Ltd (www.adroit.net)
(03) 9563 4461
0414 938 124