Re: [sage-devel] Re: New doctest continuation ....:

2013-07-05 Thread David Roe
The trailing newline is optional actually, since the doctest framework adds a newline. For example, the following should work: sage: for p in prime_range(3,6): : print p 3 5 David On Sun, Jun 23, 2013 at 3:09 PM, leif wrote: > Stefan wrote: > >> Tiny remaining comment: when typing a

[sage-devel] Re: New doctest continuation ....:

2013-06-23 Thread leif
Stefan wrote: Tiny remaining comment: when typing a multiline bit of code, the last line might just have : without spaces. Try this in command-line mode: sage: for X in range(2): : print X : 0 1 I believe the empty line is not optional, so I put it into a doctest or two. And for

[sage-devel] Re: New doctest continuation ....:

2013-06-23 Thread leif
Keshav Kini wrote: Honestly I never would have found that unless someone had pointed it out to me at a Sage Days, since I would never think to click those buttons under the Help page in the notebook -- I had just assumed they were the same static documentation as elsewhere. I guess it's more dis

[sage-devel] Re: New doctest continuation ....:

2013-06-23 Thread Stefan
Tiny remaining comment: when typing a multiline bit of code, the last line might just have : without spaces. Try this in command-line mode: sage: for X in range(2): : print X : 0 1 I believe the empty line is not optional, so I put it into a doctest or two. And for the sake of n

[sage-devel] Re: New doctest continuation ....:

2013-06-23 Thread Keshav Kini
Simon King writes: > On 2013-06-20, kcrisman wrote: >>> the matroids code (#7477) has plenty of examples. Until now I wasn't even >>> aware of the existence of live documentation... but it's incredibly useful! >>> >> >> It is SO useful!!! > > I've never heard of it either. Can you briefly expl

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Simon King
Hi! On 2013-06-20, kcrisman wrote: >> the matroids code (#7477) has plenty of examples. Until now I wasn't even >> aware of the existence of live documentation... but it's incredibly useful! >> > > It is SO useful!!! I've never heard of it either. Can you briefly explain what it is? Best reg

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread leif
leif wrote: Keshav Kini wrote: Stefan writes: I'd ask for p[6:], that's the expected use and consistent with the previous line which tests for '... ' (note the space). I agree with that - I was just miming the .lstrip() after 'sage:' found in previous lines. I'll fix it. Cf. #10458 ... :-

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread leif
Keshav Kini wrote: Stefan writes: I'd ask for p[6:], that's the expected use and consistent with the previous line which tests for '... ' (note the space). I agree with that - I was just miming the .lstrip() after 'sage:' found in previous lines. I'll fix it. Cf. #10458 ... :-) -leif -

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Keshav Kini
Keshav Kini writes: > Keshav Kini writes: >> Stefan writes: >> >>> I'd ask for p[6:], that's the expected use and consistent with the previous >>> line which tests for '... ' (note the space). >> >> I agree with that - I was just miming the .lstrip() after 'sage:' found >> in previous lines. I'

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Keshav Kini
Keshav Kini writes: > Stefan writes: > >> I'd ask for p[6:], that's the expected use and consistent with the previous >> line which tests for '... ' (note the space). > > I agree with that - I was just miming the .lstrip() after 'sage:' found > in previous lines. I'll fix it. OK, pushed. How mu

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Keshav Kini
Stefan writes: > I'd ask for p[6:], that's the expected use and consistent with the previous > line which tests for '... ' (note the space). I agree with that - I was just miming the .lstrip() after 'sage:' found in previous lines. I'll fix it. -Keshav -- You received this message because yo

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Stefan
I'd ask for p[6:], that's the expected use and consistent with the previous line which tests for '... ' (note the space). --Stefan. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it,

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
Don't strip, line continuations are often indented. > > Correct, I just confirmed that breaks things. Keshav, do you want to do > the same diff without the lstrip, or should I submit a pull request? > I should point out that I confirmed this makes things not break :) -- You received this me

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
On Thursday, June 20, 2013 4:26:00 PM UTC-4, kcrisman wrote: > > > Don't strip, line continuations are often indented. > >> >> Correct, I just confirmed that breaks things. Keshav, do you want to do >> the same diff without the lstrip, or should I submit a pull request? >> > > I should point ou

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
On Thursday, June 20, 2013 4:14:24 PM UTC-4, Stefan wrote: > > Don't strip, line continuations are often indented. Correct, I just confirmed that breaks things. Keshav, do you want to do the same diff without the lstrip, or should I submit a pull request? -- You received this message becaus

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
On Thursday, June 20, 2013 3:51:01 PM UTC-4, Keshav Kini wrote: > > Stefan > writes: > > > The fix should be adding two lines after line 374 of > > > > > https://github.com/sagemath/sagenb/blob/master/sagenb/notebook/docHTMLProcessor.py > > > > > I don't have time to get acquainted with No

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Stefan
Don't strip, line continuations are often indented. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group,

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Keshav Kini
Stefan writes: > The fix should be adding two lines after line 374 of > > https://github.com/sagemath/sagenb/blob/master/sagenb/notebook/docHTMLProcessor.py > > I don't have time to get acquainted with Notebook development right now, or > I'd fix it myself... Like this, I imagine? https://gith

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Stefan
The fix should be adding two lines after line 374 of https://github.com/sagemath/sagenb/blob/master/sagenb/notebook/docHTMLProcessor.py I don't have time to get acquainted with Notebook development right now, or I'd fix it myself... -- You received this message because you are subscribed to th

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
> > > Confirmed; > Thanks for confirming. > the matroids code (#7477) has plenty of examples. Until now I wasn't even > aware of the existence of live documentation... but it's incredibly useful! > It is SO useful!!! -- You received this message because you are subscribed to the Goo

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread Stefan
> I believe that this style of continuation breaks the live documentation. > I couldn't easily find any non-underscore methods (which of course don't > show up in the reference manual) but while working on #13381 I discovered > this. So it would be very, very good to fix this before requirin

[sage-devel] Re: New doctest continuation ....:

2013-06-20 Thread kcrisman
On Wednesday, May 8, 2013 5:58:13 AM UTC-4, Jeroen Demeyer wrote: > > The new doctesting framework allows doctests with continuation to be > written like > > sage: > : > : > > instead of the old > > I believe that this style of continuation breaks the live documentation. I couldn

[sage-devel] Re: New doctest continuation ....:

2013-05-08 Thread Simon King
Hi Jeroen, On 2013-05-08, Jeroen Demeyer wrote: > On 05/08/2013 04:23 PM, Nathann Cohen wrote: >> As the patchbot already reacts when new patches are added to a ticket, >> would it be possible to ask it to "just check" that the new patch is >> correct, and either to have a special color for that

Re: [sage-devel] Re: New doctest continuation ....:

2013-05-08 Thread Jeroen Demeyer
On 05/08/2013 05:05 PM, Nathann Cohen wrote: We will probably have to rebase them anyway if you merge your patch which changes all doctests. I'm not going to change all doctests, that would indeed be too problematic. Didn't you say that it was possible to automatically update all patches uploa

Re: [sage-devel] Re: New doctest continuation ....:

2013-05-08 Thread Nathann Cohen
Hello ! > And would you require the use of ":"? Yep. > * If it's optional, people are going to ignore it. Then it shouldn't be. Otherwise you will be the one complaining on tickets, and I prefer to anger a bot than to anger you :-P > * If it's mandatory, people will complain that a

Re: [sage-devel] Re: New doctest continuation ....:

2013-05-08 Thread Jeroen Demeyer
On 05/08/2013 04:23 PM, Nathann Cohen wrote: As the patchbot already reacts when new patches are added to a ticket, would it be possible to ask it to "just check" that the new patch is correct, and either to have a special color for that or even to post a message on the trac ticket saying that th

[sage-devel] Re: New doctest continuation ....:

2013-05-08 Thread Nathann Cohen
> Any ideas? > Jeroen. > As the patchbot already reacts when new patches are added to a ticket, would it be possible to ask it to "just check" that the new patch is correct, and either to have a special color for that or even to post a message on the trac ticket saying that the ... should b