Show More
@@ -880,9 +880,14 b' def annotate(web, req, tmpl):' | |||||
880 | lines = fctx.annotate(follow=True, linenumber=True, |
|
880 | lines = fctx.annotate(follow=True, linenumber=True, | |
881 | diffopts=diffopts) |
|
881 | diffopts=diffopts) | |
882 | previousrev = None |
|
882 | previousrev = None | |
|
883 | blockparitygen = paritygen(1) | |||
883 | for lineno, ((f, targetline), l) in enumerate(lines): |
|
884 | for lineno, ((f, targetline), l) in enumerate(lines): | |
884 | rev = f.rev() |
|
885 | rev = f.rev() | |
885 |
|
|
886 | if rev != previousrev: | |
|
887 | blockhead = True | |||
|
888 | blockparity = next(blockparitygen) | |||
|
889 | else: | |||
|
890 | blockhead = None | |||
886 | previousrev = rev |
|
891 | previousrev = rev | |
887 | yield {"parity": next(parity), |
|
892 | yield {"parity": next(parity), | |
888 | "node": f.hex(), |
|
893 | "node": f.hex(), | |
@@ -893,6 +898,7 b' def annotate(web, req, tmpl):' | |||||
893 | "extra": f.extra(), |
|
898 | "extra": f.extra(), | |
894 | "file": f.path(), |
|
899 | "file": f.path(), | |
895 | "blockhead": blockhead, |
|
900 | "blockhead": blockhead, | |
|
901 | "blockparity": blockparity, | |||
896 | "targetline": targetline, |
|
902 | "targetline": targetline, | |
897 | "line": l, |
|
903 | "line": l, | |
898 | "lineno": lineno + 1, |
|
904 | "lineno": lineno + 1, |
@@ -77,7 +77,7 b' filelogentry = filelogentry.tmpl' | |||||
77 |
|
77 | |||
78 | annotateline = ' |
|
78 | annotateline = ' | |
79 | <tr id="{lineid}"{ifeq(node, originalnode, ' class="thisrev"')}> |
|
79 | <tr id="{lineid}"{ifeq(node, originalnode, ' class="thisrev"')}> | |
80 | <td class="annotate"> |
|
80 | <td class="annotate parity{blockparity}"> | |
81 | {if(blockhead, |
|
81 | {if(blockhead, | |
82 | '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"> |
|
82 | '<a href="{url|urlescape}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}#l{targetline}"> | |
83 | {rev} |
|
83 | {rev} |
@@ -289,7 +289,7 b' hgweb fileannotate, html' | |||||
289 | <tbody class="stripes2"> |
|
289 | <tbody class="stripes2"> | |
290 |
|
290 | |||
291 | <tr id="l1" class="thisrev"> |
|
291 | <tr id="l1" class="thisrev"> | |
292 | <td class="annotate"> |
|
292 | <td class="annotate parity0"> | |
293 | <a href="/annotate/06824edf55d0/primes.py#l1"> |
|
293 | <a href="/annotate/06824edf55d0/primes.py#l1"> | |
294 | 0 |
|
294 | 0 | |
295 | </a> |
|
295 | </a> | |
@@ -308,7 +308,7 b' hgweb fileannotate, html' | |||||
308 | <td class="source"><a href="#l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td> |
|
308 | <td class="source"><a href="#l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td> | |
309 | </tr> |
|
309 | </tr> | |
310 | <tr id="l2" class="thisrev"> |
|
310 | <tr id="l2" class="thisrev"> | |
311 | <td class="annotate"> |
|
311 | <td class="annotate parity0"> | |
312 |
|
312 | |||
313 | <div class="annotate-info"> |
|
313 | <div class="annotate-info"> | |
314 | <div> |
|
314 | <div> | |
@@ -325,7 +325,7 b' hgweb fileannotate, html' | |||||
325 | <td class="source"><a href="#l2"> 2</a> </td> |
|
325 | <td class="source"><a href="#l2"> 2</a> </td> | |
326 | </tr> |
|
326 | </tr> | |
327 | <tr id="l3" class="thisrev"> |
|
327 | <tr id="l3" class="thisrev"> | |
328 | <td class="annotate"> |
|
328 | <td class="annotate parity0"> | |
329 |
|
329 | |||
330 | <div class="annotate-info"> |
|
330 | <div class="annotate-info"> | |
331 | <div> |
|
331 | <div> | |
@@ -342,7 +342,7 b' hgweb fileannotate, html' | |||||
342 | <td class="source"><a href="#l3"> 3</a> <span class="sd">"""Fun with generators. Corresponding Haskell implementation:</span></td> |
|
342 | <td class="source"><a href="#l3"> 3</a> <span class="sd">"""Fun with generators. Corresponding Haskell implementation:</span></td> | |
343 | </tr> |
|
343 | </tr> | |
344 | <tr id="l4" class="thisrev"> |
|
344 | <tr id="l4" class="thisrev"> | |
345 | <td class="annotate"> |
|
345 | <td class="annotate parity0"> | |
346 |
|
346 | |||
347 | <div class="annotate-info"> |
|
347 | <div class="annotate-info"> | |
348 | <div> |
|
348 | <div> | |
@@ -359,7 +359,7 b' hgweb fileannotate, html' | |||||
359 | <td class="source"><a href="#l4"> 4</a> </td> |
|
359 | <td class="source"><a href="#l4"> 4</a> </td> | |
360 | </tr> |
|
360 | </tr> | |
361 | <tr id="l5" class="thisrev"> |
|
361 | <tr id="l5" class="thisrev"> | |
362 | <td class="annotate"> |
|
362 | <td class="annotate parity0"> | |
363 |
|
363 | |||
364 | <div class="annotate-info"> |
|
364 | <div class="annotate-info"> | |
365 | <div> |
|
365 | <div> | |
@@ -376,7 +376,7 b' hgweb fileannotate, html' | |||||
376 | <td class="source"><a href="#l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td> |
|
376 | <td class="source"><a href="#l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td> | |
377 | </tr> |
|
377 | </tr> | |
378 | <tr id="l6" class="thisrev"> |
|
378 | <tr id="l6" class="thisrev"> | |
379 | <td class="annotate"> |
|
379 | <td class="annotate parity0"> | |
380 |
|
380 | |||
381 | <div class="annotate-info"> |
|
381 | <div class="annotate-info"> | |
382 | <div> |
|
382 | <div> | |
@@ -393,7 +393,7 b' hgweb fileannotate, html' | |||||
393 | <td class="source"><a href="#l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]</span></td> |
|
393 | <td class="source"><a href="#l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]</span></td> | |
394 | </tr> |
|
394 | </tr> | |
395 | <tr id="l7" class="thisrev"> |
|
395 | <tr id="l7" class="thisrev"> | |
396 | <td class="annotate"> |
|
396 | <td class="annotate parity0"> | |
397 |
|
397 | |||
398 | <div class="annotate-info"> |
|
398 | <div class="annotate-info"> | |
399 | <div> |
|
399 | <div> | |
@@ -410,7 +410,7 b' hgweb fileannotate, html' | |||||
410 | <td class="source"><a href="#l7"> 7</a> <span class="sd">"""</span></td> |
|
410 | <td class="source"><a href="#l7"> 7</a> <span class="sd">"""</span></td> | |
411 | </tr> |
|
411 | </tr> | |
412 | <tr id="l8" class="thisrev"> |
|
412 | <tr id="l8" class="thisrev"> | |
413 | <td class="annotate"> |
|
413 | <td class="annotate parity0"> | |
414 |
|
414 | |||
415 | <div class="annotate-info"> |
|
415 | <div class="annotate-info"> | |
416 | <div> |
|
416 | <div> | |
@@ -427,7 +427,7 b' hgweb fileannotate, html' | |||||
427 | <td class="source"><a href="#l8"> 8</a> </td> |
|
427 | <td class="source"><a href="#l8"> 8</a> </td> | |
428 | </tr> |
|
428 | </tr> | |
429 | <tr id="l9" class="thisrev"> |
|
429 | <tr id="l9" class="thisrev"> | |
430 | <td class="annotate"> |
|
430 | <td class="annotate parity0"> | |
431 |
|
431 | |||
432 | <div class="annotate-info"> |
|
432 | <div class="annotate-info"> | |
433 | <div> |
|
433 | <div> | |
@@ -444,7 +444,7 b' hgweb fileannotate, html' | |||||
444 | <td class="source"><a href="#l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td> |
|
444 | <td class="source"><a href="#l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td> | |
445 | </tr> |
|
445 | </tr> | |
446 | <tr id="l10" class="thisrev"> |
|
446 | <tr id="l10" class="thisrev"> | |
447 | <td class="annotate"> |
|
447 | <td class="annotate parity0"> | |
448 |
|
448 | |||
449 | <div class="annotate-info"> |
|
449 | <div class="annotate-info"> | |
450 | <div> |
|
450 | <div> | |
@@ -461,7 +461,7 b' hgweb fileannotate, html' | |||||
461 | <td class="source"><a href="#l10"> 10</a> </td> |
|
461 | <td class="source"><a href="#l10"> 10</a> </td> | |
462 | </tr> |
|
462 | </tr> | |
463 | <tr id="l11" class="thisrev"> |
|
463 | <tr id="l11" class="thisrev"> | |
464 | <td class="annotate"> |
|
464 | <td class="annotate parity0"> | |
465 |
|
465 | |||
466 | <div class="annotate-info"> |
|
466 | <div class="annotate-info"> | |
467 | <div> |
|
467 | <div> | |
@@ -478,7 +478,7 b' hgweb fileannotate, html' | |||||
478 | <td class="source"><a href="#l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td> |
|
478 | <td class="source"><a href="#l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td> | |
479 | </tr> |
|
479 | </tr> | |
480 | <tr id="l12" class="thisrev"> |
|
480 | <tr id="l12" class="thisrev"> | |
481 | <td class="annotate"> |
|
481 | <td class="annotate parity0"> | |
482 |
|
482 | |||
483 | <div class="annotate-info"> |
|
483 | <div class="annotate-info"> | |
484 | <div> |
|
484 | <div> | |
@@ -495,7 +495,7 b' hgweb fileannotate, html' | |||||
495 | <td class="source"><a href="#l12"> 12</a> <span class="sd">"""Generate all primes."""</span></td> |
|
495 | <td class="source"><a href="#l12"> 12</a> <span class="sd">"""Generate all primes."""</span></td> | |
496 | </tr> |
|
496 | </tr> | |
497 | <tr id="l13" class="thisrev"> |
|
497 | <tr id="l13" class="thisrev"> | |
498 | <td class="annotate"> |
|
498 | <td class="annotate parity0"> | |
499 |
|
499 | |||
500 | <div class="annotate-info"> |
|
500 | <div class="annotate-info"> | |
501 | <div> |
|
501 | <div> | |
@@ -512,7 +512,7 b' hgweb fileannotate, html' | |||||
512 | <td class="source"><a href="#l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td> |
|
512 | <td class="source"><a href="#l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td> | |
513 | </tr> |
|
513 | </tr> | |
514 | <tr id="l14" class="thisrev"> |
|
514 | <tr id="l14" class="thisrev"> | |
515 | <td class="annotate"> |
|
515 | <td class="annotate parity0"> | |
516 |
|
516 | |||
517 | <div class="annotate-info"> |
|
517 | <div class="annotate-info"> | |
518 | <div> |
|
518 | <div> | |
@@ -529,7 +529,7 b' hgweb fileannotate, html' | |||||
529 | <td class="source"><a href="#l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td> |
|
529 | <td class="source"><a href="#l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td> | |
530 | </tr> |
|
530 | </tr> | |
531 | <tr id="l15" class="thisrev"> |
|
531 | <tr id="l15" class="thisrev"> | |
532 | <td class="annotate"> |
|
532 | <td class="annotate parity0"> | |
533 |
|
533 | |||
534 | <div class="annotate-info"> |
|
534 | <div class="annotate-info"> | |
535 | <div> |
|
535 | <div> | |
@@ -546,7 +546,7 b' hgweb fileannotate, html' | |||||
546 | <td class="source"><a href="#l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td> |
|
546 | <td class="source"><a href="#l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td> | |
547 | </tr> |
|
547 | </tr> | |
548 | <tr id="l16" class="thisrev"> |
|
548 | <tr id="l16" class="thisrev"> | |
549 | <td class="annotate"> |
|
549 | <td class="annotate parity0"> | |
550 |
|
550 | |||
551 | <div class="annotate-info"> |
|
551 | <div class="annotate-info"> | |
552 | <div> |
|
552 | <div> | |
@@ -563,7 +563,7 b' hgweb fileannotate, html' | |||||
563 | <td class="source"><a href="#l16"> 16</a> <span class="c"># infinite recursion.</span></td> |
|
563 | <td class="source"><a href="#l16"> 16</a> <span class="c"># infinite recursion.</span></td> | |
564 | </tr> |
|
564 | </tr> | |
565 | <tr id="l17" class="thisrev"> |
|
565 | <tr id="l17" class="thisrev"> | |
566 | <td class="annotate"> |
|
566 | <td class="annotate parity0"> | |
567 |
|
567 | |||
568 | <div class="annotate-info"> |
|
568 | <div class="annotate-info"> | |
569 | <div> |
|
569 | <div> | |
@@ -580,7 +580,7 b' hgweb fileannotate, html' | |||||
580 | <td class="source"><a href="#l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td> |
|
580 | <td class="source"><a href="#l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td> | |
581 | </tr> |
|
581 | </tr> | |
582 | <tr id="l18" class="thisrev"> |
|
582 | <tr id="l18" class="thisrev"> | |
583 | <td class="annotate"> |
|
583 | <td class="annotate parity0"> | |
584 |
|
584 | |||
585 | <div class="annotate-info"> |
|
585 | <div class="annotate-info"> | |
586 | <div> |
|
586 | <div> | |
@@ -597,7 +597,7 b' hgweb fileannotate, html' | |||||
597 | <td class="source"><a href="#l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td> |
|
597 | <td class="source"><a href="#l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td> | |
598 | </tr> |
|
598 | </tr> | |
599 | <tr id="l19" class="thisrev"> |
|
599 | <tr id="l19" class="thisrev"> | |
600 | <td class="annotate"> |
|
600 | <td class="annotate parity0"> | |
601 |
|
601 | |||
602 | <div class="annotate-info"> |
|
602 | <div class="annotate-info"> | |
603 | <div> |
|
603 | <div> | |
@@ -614,7 +614,7 b' hgweb fileannotate, html' | |||||
614 | <td class="source"><a href="#l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td> |
|
614 | <td class="source"><a href="#l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td> | |
615 | </tr> |
|
615 | </tr> | |
616 | <tr id="l20" class="thisrev"> |
|
616 | <tr id="l20" class="thisrev"> | |
617 | <td class="annotate"> |
|
617 | <td class="annotate parity0"> | |
618 |
|
618 | |||
619 | <div class="annotate-info"> |
|
619 | <div class="annotate-info"> | |
620 | <div> |
|
620 | <div> | |
@@ -631,7 +631,7 b' hgweb fileannotate, html' | |||||
631 | <td class="source"><a href="#l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td> |
|
631 | <td class="source"><a href="#l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td> | |
632 | </tr> |
|
632 | </tr> | |
633 | <tr id="l21" class="thisrev"> |
|
633 | <tr id="l21" class="thisrev"> | |
634 | <td class="annotate"> |
|
634 | <td class="annotate parity0"> | |
635 |
|
635 | |||
636 | <div class="annotate-info"> |
|
636 | <div class="annotate-info"> | |
637 | <div> |
|
637 | <div> | |
@@ -648,7 +648,7 b' hgweb fileannotate, html' | |||||
648 | <td class="source"><a href="#l21"> 21</a> </td> |
|
648 | <td class="source"><a href="#l21"> 21</a> </td> | |
649 | </tr> |
|
649 | </tr> | |
650 | <tr id="l22" class="thisrev"> |
|
650 | <tr id="l22" class="thisrev"> | |
651 | <td class="annotate"> |
|
651 | <td class="annotate parity0"> | |
652 |
|
652 | |||
653 | <div class="annotate-info"> |
|
653 | <div class="annotate-info"> | |
654 | <div> |
|
654 | <div> | |
@@ -665,7 +665,7 b' hgweb fileannotate, html' | |||||
665 | <td class="source"><a href="#l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td> |
|
665 | <td class="source"><a href="#l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td> | |
666 | </tr> |
|
666 | </tr> | |
667 | <tr id="l23" class="thisrev"> |
|
667 | <tr id="l23" class="thisrev"> | |
668 | <td class="annotate"> |
|
668 | <td class="annotate parity0"> | |
669 |
|
669 | |||
670 | <div class="annotate-info"> |
|
670 | <div class="annotate-info"> | |
671 | <div> |
|
671 | <div> | |
@@ -682,7 +682,7 b' hgweb fileannotate, html' | |||||
682 | <td class="source"><a href="#l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o"><</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td> |
|
682 | <td class="source"><a href="#l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o"><</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td> | |
683 | </tr> |
|
683 | </tr> | |
684 | <tr id="l24" class="thisrev"> |
|
684 | <tr id="l24" class="thisrev"> | |
685 | <td class="annotate"> |
|
685 | <td class="annotate parity0"> | |
686 |
|
686 | |||
687 | <div class="annotate-info"> |
|
687 | <div class="annotate-info"> | |
688 | <div> |
|
688 | <div> | |
@@ -699,7 +699,7 b' hgweb fileannotate, html' | |||||
699 | <td class="source"><a href="#l24"> 24</a> </td> |
|
699 | <td class="source"><a href="#l24"> 24</a> </td> | |
700 | </tr> |
|
700 | </tr> | |
701 | <tr id="l25" class="thisrev"> |
|
701 | <tr id="l25" class="thisrev"> | |
702 | <td class="annotate"> |
|
702 | <td class="annotate parity0"> | |
703 |
|
703 | |||
704 | <div class="annotate-info"> |
|
704 | <div class="annotate-info"> | |
705 | <div> |
|
705 | <div> | |
@@ -716,7 +716,7 b' hgweb fileannotate, html' | |||||
716 | <td class="source"><a href="#l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">"__main__"</span><span class="p">:</span></td> |
|
716 | <td class="source"><a href="#l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">"__main__"</span><span class="p">:</span></td> | |
717 | </tr> |
|
717 | </tr> | |
718 | <tr id="l26" class="thisrev"> |
|
718 | <tr id="l26" class="thisrev"> | |
719 | <td class="annotate"> |
|
719 | <td class="annotate parity0"> | |
720 |
|
720 | |||
721 | <div class="annotate-info"> |
|
721 | <div class="annotate-info"> | |
722 | <div> |
|
722 | <div> | |
@@ -733,7 +733,7 b' hgweb fileannotate, html' | |||||
733 | <td class="source"><a href="#l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td> |
|
733 | <td class="source"><a href="#l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td> | |
734 | </tr> |
|
734 | </tr> | |
735 | <tr id="l27" class="thisrev"> |
|
735 | <tr id="l27" class="thisrev"> | |
736 | <td class="annotate"> |
|
736 | <td class="annotate parity0"> | |
737 |
|
737 | |||
738 | <div class="annotate-info"> |
|
738 | <div class="annotate-info"> | |
739 | <div> |
|
739 | <div> | |
@@ -750,7 +750,7 b' hgweb fileannotate, html' | |||||
750 | <td class="source"><a href="#l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td> |
|
750 | <td class="source"><a href="#l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td> | |
751 | </tr> |
|
751 | </tr> | |
752 | <tr id="l28" class="thisrev"> |
|
752 | <tr id="l28" class="thisrev"> | |
753 | <td class="annotate"> |
|
753 | <td class="annotate parity0"> | |
754 |
|
754 | |||
755 | <div class="annotate-info"> |
|
755 | <div class="annotate-info"> | |
756 | <div> |
|
756 | <div> | |
@@ -767,7 +767,7 b' hgweb fileannotate, html' | |||||
767 | <td class="source"><a href="#l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></td> |
|
767 | <td class="source"><a href="#l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></td> | |
768 | </tr> |
|
768 | </tr> | |
769 | <tr id="l29" class="thisrev"> |
|
769 | <tr id="l29" class="thisrev"> | |
770 | <td class="annotate"> |
|
770 | <td class="annotate parity0"> | |
771 |
|
771 | |||
772 | <div class="annotate-info"> |
|
772 | <div class="annotate-info"> | |
773 | <div> |
|
773 | <div> | |
@@ -784,7 +784,7 b' hgweb fileannotate, html' | |||||
784 | <td class="source"><a href="#l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td> |
|
784 | <td class="source"><a href="#l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td> | |
785 | </tr> |
|
785 | </tr> | |
786 | <tr id="l30" class="thisrev"> |
|
786 | <tr id="l30" class="thisrev"> | |
787 | <td class="annotate"> |
|
787 | <td class="annotate parity0"> | |
788 |
|
788 | |||
789 | <div class="annotate-info"> |
|
789 | <div class="annotate-info"> | |
790 | <div> |
|
790 | <div> | |
@@ -801,7 +801,7 b' hgweb fileannotate, html' | |||||
801 | <td class="source"><a href="#l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></td> |
|
801 | <td class="source"><a href="#l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></td> | |
802 | </tr> |
|
802 | </tr> | |
803 | <tr id="l31" class="thisrev"> |
|
803 | <tr id="l31" class="thisrev"> | |
804 | <td class="annotate"> |
|
804 | <td class="annotate parity0"> | |
805 |
|
805 | |||
806 | <div class="annotate-info"> |
|
806 | <div class="annotate-info"> | |
807 | <div> |
|
807 | <div> | |
@@ -818,7 +818,7 b' hgweb fileannotate, html' | |||||
818 | <td class="source"><a href="#l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td> |
|
818 | <td class="source"><a href="#l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td> | |
819 | </tr> |
|
819 | </tr> | |
820 | <tr id="l32" class="thisrev"> |
|
820 | <tr id="l32" class="thisrev"> | |
821 | <td class="annotate"> |
|
821 | <td class="annotate parity0"> | |
822 |
|
822 | |||
823 | <div class="annotate-info"> |
|
823 | <div class="annotate-info"> | |
824 | <div> |
|
824 | <div> | |
@@ -835,7 +835,7 b' hgweb fileannotate, html' | |||||
835 | <td class="source"><a href="#l32"> 32</a> <span class="kn">print</span> <span class="s">"The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td> |
|
835 | <td class="source"><a href="#l32"> 32</a> <span class="kn">print</span> <span class="s">"The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td> | |
836 | </tr> |
|
836 | </tr> | |
837 | <tr id="l33" class="thisrev"> |
|
837 | <tr id="l33" class="thisrev"> | |
838 | <td class="annotate"> |
|
838 | <td class="annotate parity0"> | |
839 |
|
839 | |||
840 | <div class="annotate-info"> |
|
840 | <div class="annotate-info"> | |
841 | <div> |
|
841 | <div> |
General Comments 0
You need to be logged in to leave comments.
Login now