File: improve-page.rst

package info (click to toggle)
python3.14 3.14.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152,200 kB
  • sloc: python: 757,783; ansic: 718,195; xml: 31,250; sh: 5,982; cpp: 4,093; makefile: 2,007; objc: 787; lisp: 502; javascript: 136; asm: 75; csh: 12
file content (65 lines) | stat: -rw-r--r-- 2,708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
:orphan:

****************************
Improve a documentation page
****************************

.. This is the JavaScript-enabled version of this page. Another version
   (for those with JavaScript disabled) is improve-page-nojs.rst. If you
   edit this page, please also edit that one, and vice versa.

.. only:: html and not epub

   .. raw:: html

      <script>
         function applyReplacements(text, params) {
            return text
               .replace(/PAGETITLE/g, params.get('pagetitle'))
               .replace(/PAGEURL/g, params.get('pageurl'))
               .replace(/PAGESOURCE/g, params.get('pagesource'));
         }

         document.addEventListener('DOMContentLoaded', () => {
            const params = new URLSearchParams(window.location.search);
            const walker = document.createTreeWalker(
               document.body,
               NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT,
               null
            );

            while (walker.nextNode()) {
               const node = walker.currentNode;

               if (node.nodeType === Node.TEXT_NODE) {
                  node.textContent = applyReplacements(node.textContent, params)
               } else if (node.nodeName === 'A' && node.href) {
                  node.setAttribute('href', applyReplacements(node.getAttribute('href'), params));
               }
            }
         });
      </script>

We are always interested to hear ideas about improvements to the documentation.

You were reading "PAGETITLE" at `<PAGEURL>`_.  The source for that page is on
`GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_.

.. only:: translation

   If the bug or suggested improvement concerns the translation of this
   documentation, open an issue or edit the page in
   `translation's repository <TRANSLATION_REPO_>`_ instead.

You have a few ways to ask questions or suggest changes:

- You can start a discussion about the page on the Python discussion forum.
  This link will start a pre-populated topic:
  `Question about page "PAGETITLE" <https://discuss.python.org/new-topic?category=documentation&title=Question+about+page+%22PAGETITLE%22&body=About+the+page+at+PAGEURL%3A>`_.

- You can open an issue on the Python GitHub issue tracker. This link will
  create a new pre-populated issue:
  `Docs: problem with page "PAGETITLE" <https://github.com/python/cpython/issues/new?template=documentation.yml&title=Docs%3A+problem+with+page+%22PAGETITLE%22&description=The+page+at+PAGEURL+has+a+problem%3A>`_.

- You can `edit the page on GitHub <https://github.com/python/cpython/blob/main/Doc/PAGESOURCE?plain=1>`_
  to open a pull request and begin the contribution process.