blocker? ''' vs. """

4 views
Skip to first unread message

John H Palmieri

unread,
Apr 15, 2010, 6:11:52 PM4/15/10
to sage-devel
In a patch for the the Sage library (trac #7889), a file used triple
single quotes (''') rather than triple double quotes ("""). As a
result,

- sage -coverage reported 0 coverage for that file, and
- no doctests were run on the examples in the docstrings!

Our coverage scripts and doctesting scripts should be able to handle
this, shouldn't they? If not -- if there is a reason to insist on """
instead of ''' -- then we should change all ''' to """ and run
doctests to see what needs fixing.

Opinions? Volunteers to help?

--
John

William Stein

unread,
Apr 15, 2010, 6:16:43 PM4/15/10
to sage-...@googlegroups.com
On Thursday, April 15, 2010, John H Palmieri <jhpalm...@gmail.com> wrote:
> In a patch for the the Sage library (trac #7889), a file used triple
> single quotes (''') rather than triple double quotes (""").  As a
> result,
>
>  - sage -coverage reported 0 coverage for that file, and
>  - no doctests were run on the examples in the docstrings!
>
> Our coverage scripts and doctesting scripts should be able to handle
> this, shouldn't they?

They should.... But they definitely don't since at the time I was too
lazy to write them to deal with both cases, since I see no reason to
ever use single triple quotes.

Still I would be happy if somebody changed this scripts to handle both
single and double triple quotes, since clearly that is the right
longterm solution.

> If not -- if there is a reason to insist on """
> instead of ''' -- then we should change all ''' to """ and run
> doctests to see what needs fixing.
>
> Opinions?  Volunteers to help?
>
> --
> John
>

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>
> To unsubscribe, reply using "remove me" as the subject.
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Message has been deleted
Message has been deleted

John H Palmieri

unread,
Apr 17, 2010, 11:04:01 AM4/17/10
to sage-devel
Hi Minh,

Thanks for working on this. I think (but I'm not sure) that
docstrings delimited with ''' don't get doctests run on them, as well
as not showing up in "sage -coverage". Have you looked into that?

John



On Apr 17, 4:00 am, Minh Nguyen <nguyenmi...@gmail.com> wrote:
> Hi folks,
>
> On Sat, Apr 17, 2010 at 3:42 PM, Minh Nguyen <nguyenmi...@gmail.com> wrote:
>
> <SNIP>
>
> > This issue is now tracked at ticket #8699:
>
> >http://trac.sagemath.org/sage_trac/ticket/8699
>
> This ticket now awaits review.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages