New submission from Ramchandra Apte maniandra...@gmail.com:
In
http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator
, two code samples
--
assignee: docs@python
components: Documentation
messages: 157551
nosy: docs@python, ramchandra.apte
Ramchandra Apte maniandra...@gmail.com added the comment:
Whoops -
In
http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator
, two code samples are not highlighted.
--
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
I'm not seeing any unhighlighted examples in that section.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14503
Berker Peksag berker.pek...@gmail.com added the comment:
I can reproduce. See screenshot.png.
--
nosy: +berker.peksag
Added file: http://bugs.python.org/file25135/screenshot.png
___
Python tracker rep...@bugs.python.org
R. David Murray rdmur...@bitdance.com added the comment:
Berker: you can reproduce the bug, or the fact that they are highlighted? The
png looks like they are highlighted, so I assume the latter.
--
___
Python tracker rep...@bugs.python.org
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
they are highlighted
No. Keywords normally appear in bold font, and with another color. This is not
the case in these blocks.
Probably because the language detection does not work with the new yield from
construct. Sphinx should
R. David Murray rdmur...@bitdance.com added the comment:
Ah, you mean they are not *syntax* highlighted. Now I understand. Sorry for
missing that.
My understanding is that Sphinx does not use Python directly to parse the code
and highlight it, it uses pygments, which uses regexes. So this
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Not exactly. Sphinx first tries to see if the block is a Python script, and to
do so it uses the Python compiler:
https://bitbucket.org/birkenfeld/sphinx/src/164f59b2d946/sphinx/highlighting.py#cl-117
In case of SyntaxError, it treats
R. David Murray rdmur...@bitdance.com added the comment:
Huh. Well, in another issue Georg said it was now possible to upgrade the doc
build toolchain to Python3.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14503