Thanks Alan Gauld On Mon, Jun 8, 2015 at 9:27 PM, Alan Gauld <alan.ga...@btinternet.com> wrote:
> On 08/06/15 10:34, Sunil Tech wrote: > > what is the standard way of using docstrings? >> > > As Steven said there are several "standards". > > Yet another option is to use the format required > by doctest. For your example: > > def test(x): > """ > A dummy method > >>> test(5) > True > >>> test(-5) > False > """ > > Or whatever test cases make sense. > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor