On May 3, 2:24 am, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> On Sun, Apr 29, 2012 at 3:34 PM, David Kirkby <david.kir...@onetel.net> wrote:
> > On 29 April 2012 20:58, Simon King <simon.k...@uni-jena.de> wrote:
>
> >>  sage: foobar?
> >> it would be doable that one reads:
> >>  Type:           function
> >>  Base Class:     <type 'function'>
> >>  String Form:    <function foobar at 0x4eb9f50>
> >>  Namespace:      Interactive
> >>  Loaded File:    ...
> >>  Source File:    ...
> >>  Definition:     foobar(x, y)
> >>  Docstring:
> >>         Please contribute to Sage by writing a doctest
> >>         for this function!
>
> >>         This function does useful stuff.
>
> >> Here, there is no regression (reading documentation is not
> >> time-critical), and it is clearly doable.
>
> >> What do people think? Would that kind of message encourage people to do
> >> their first contribution, or would that scare people off?
>
> > I think it might get people to contribute. It needs a link to a page
> > describing in detail the process of writing a doctest for Sage, and
> > how to get that doctest into Sage.
>
> > Perhaps it woud scare a few people off, but overall I would have
> > thought the result positive.
>
> +1, I think that's a great idea.
>
> What may also help is making it trivial to create doctests, e.g.
>
> sage: add_doctest(some_method, "Description.")
> sage: some_method(4)
> 2
> sage: some_method(5)
> 5
> sage: some_method(32)
> 5
> sage: some_method(3)
> 7
> sage: finish_doctest()
> Please upload /tmp/doctest-some_method.patch to trac.

Zap!  Yes!  Just like the fabled "making a patch on the web" idea.
Though I suspect you could only easily do the above for things with no
docstring...

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to