You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
html documentation does not show comments in code blocks #59088
bpo-12947: doctest directive examples in library/doctest.html lack the flags
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2012-05-22.14:18:23.317>created_at=<Date2012-05-22.14:15:30.438>labels= ['type-bug', 'docs']
title='html documentation does not show comments in code blocks'updated_at=<Date2012-05-22.14:18:23.315>user='https://bugs.python.org/alexgarel'
Activity
alexgarel commentedon May 22, 2012
Just under http://docs.python.org/library/doctest.html#doctest.REPORTING_FLAGS documentation speaks about how Doctest directives maybe expressed as special Python comments.
There are some example along with the narrative story, however comments which here are the important part, are not displayed in code snippet.
Looking at the sphinx source for this page : http://docs.python.org/_sources/library/doctest.txt the comments are present. Eg.
However in the generated html, they are not:
<span class="k">print</span> <span class="nb">range</span>
<span class="p">(</span><span class="mi">20</span><span class="p">)</span>
<span class="go">[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,</span>
Note that this issue is not present in python 2.6.8 documentation http://docs.python.org/release/2.6.8/library/doctest.html#doctest.REPORTING_FLAGS and also 3.1.5 is ok.
It appears versions at 3.2.1 and 2.7.3
ezio-melotti commentedon May 22, 2012
This is a duplicate of bpo-12947.