[issue42571] add links to Glossary#parameter in libraries
New submission from Frederic Gagnon <gagnonfrederic9@gmail.com>: Could be helpful to make it so that, in libraries, / * *<param> and **<param> (i.e. positional-only, keyword-only, var-positional and var-keyword indicators) link to https://docs.python.org/3/glossary.html#term-parameter This come from someone relatively new to python that had a somewhat hard time understanding what the ", *," stood for in https://docs.python.org/3/library/glob.html#glob.glob ---------- assignee: docs@python components: Documentation messages: 382530 nosy: docs@python, fredg1 priority: normal severity: normal status: open title: [docs] add links to Glossary#parameter in libraries type: enhancement _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42571> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: I don’t think every function signature should have links when using `*`, `*args` or `**kwargs`. Is there another page that we could improve? What did you search for when you wanted to understand what it means? Possible candidates: tutorial page about functions; language reference about functions; others? ---------- nosy: +eric.araujo _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42571> _______________________________________
Frederic Gagnon <gagnonfrederic9@gmail.com> added the comment: I didn't know if that "*" was part of python, or just specific to the documentation. I started by just looking around the page (header, section on the left and footer) for some kind of link pointing to how to interpret the documentation. Not finding anything, I went up the tree (first to https://docs.python.org/3/library/index.html , then to https://docs.python.org/3/index.html ). I then went to the FAQ ( https://docs.python.org/3/faq/index.html ). (Little did I know, the answer was in Glossary...) Not finding any answer there, I tried googling it (simply starting with "python *"), but since * is interpreted as a wildcard, my searches only gave broad results about "python". I then asked a friend who pointed me to https://stackoverflow.com/questions/51362773/what-does-mean-as-a-parameter-i... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42571> _______________________________________
Frederic Gagnon <gagnonfrederic9@gmail.com> added the comment: The information could be added to https://docs.python.org/3/faq/library.html#general-library-questions , leading to links to where to find information about the library's syntax ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42571> _______________________________________
Éric Araujo <merwok@netwok.org> added the comment: Thank you for the details! This helps finding a good place to document this. A link to function parameters from the top of the section may be good. But maybe we need a sidebar link on all pages that goes to a description of doc conventions! (and includes link to basic syntax doc, function parameter glossary, tutorial). (As you thought, there are notations in the docs (and even in some docstrings) that are documentation conventions but not valid Python, such as "range(start, stop[, step]) -> range object") Even the enty for '* (asterisk)' in the general index https://docs.python.org/3/genindex-Symbols.html links to places explaining *args, not * alone. I agree that the glossary entry for parameter is the best place to link to: it’s short and complete and can link to language reference for more. ---------- title: [docs] add links to Glossary#parameter in libraries -> Make documentation of * in function signatures easier to find versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue42571> _______________________________________
participants (2)
-
Frederic Gagnon -
Éric Araujo