[issue41045] f-string's "debug" feature is undocumented

Guido van Rossum report at bugs.python.org
Thu Jul 23 00:28:52 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

I've reviewed your first PR (#21509).

Regarding your second one, I think there's a misunderstanding. With "pydoc" I didn't mean "the Python docs". IMO the documentation of f-strings in the language reference is sufficient, there's no need for another section about it in the library reference.

What I meant was that the pydoc *module* doesn't have any text about f-strings. The help() builtin calls pydoc.help(), and there are some *special* topics that you can invoke whose source text is generated
by running `make pydoc-topics` in the Doc directory and copying the output into Lib/pydoc_data/. There is a list of topics included in Doc/tools/extensions/pyspecific.py (pydoc_topic_labels) and something has to be added there. But beware! This code is tricky. You also need to add an entry to pydoc.py itself, to the dict named 'topics' around line 1891. I think you can just add an entry FSTRINGS to the latter and make it point to the section labeled f-strings in the language reference (which you are updating in PR 21509).

Let me know if you need more help (I had a fun hour figuring out how all this works :-).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41045>
_______________________________________


More information about the Python-bugs-list mailing list