MCPcopy Index your code
hub / github.com/python/cpython / Helper

Class Helper

Lib/pydoc.py:1809–2206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1807 ''')
1808
1809class Helper:
1810
1811 # These dictionaries map a topic name to either an alias, or a tuple
1812 # (label, seealso-items). The "label" is the label of the corresponding
1813 # section in the .rst file under Doc/ and an index into the dictionary
1814 # in pydoc_data/topics.py.
1815 #
1816 # CAUTION: if you change one of these dictionaries, be sure to adapt the
1817 # list of needed labels in Doc/tools/extensions/pyspecific.py and
1818 # regenerate the pydoc_data/topics.py file by running
1819 # make pydoc-topics
1820 # in Doc/ and copying the output file into the Lib/ directory.
1821
1822 keywords = {
1823 'False': '',
1824 'None': '',
1825 'True': '',
1826 'and': 'BOOLEAN',
1827 'as': 'with',
1828 'assert': ('assert', ''),
1829 'async': ('async', ''),
1830 'await': ('await', ''),
1831 'break': ('break', 'while for'),
1832 'class': ('class', 'CLASSES SPECIALMETHODS'),
1833 'continue': ('continue', 'while for'),
1834 'def': ('function', ''),
1835 'del': ('del', 'BASICMETHODS'),
1836 'elif': 'if',
1837 'else': ('else', 'while for'),
1838 'except': 'try',
1839 'finally': 'try',
1840 'for': ('for', 'break continue while'),
1841 'from': 'import',
1842 'global': ('global', 'nonlocal NAMESPACES'),
1843 'if': ('if', 'TRUTHVALUE'),
1844 'import': ('import', 'MODULES'),
1845 'in': ('in', 'SEQUENCEMETHODS'),
1846 'is': 'COMPARISON',
1847 'lambda': ('lambda', 'FUNCTIONS'),
1848 'nonlocal': ('nonlocal', 'global NAMESPACES'),
1849 'not': 'BOOLEAN',
1850 'or': 'BOOLEAN',
1851 'pass': ('pass', ''),
1852 'raise': ('raise', 'EXCEPTIONS'),
1853 'return': ('return', 'FUNCTIONS'),
1854 'try': ('try', 'EXCEPTIONS'),
1855 'while': ('while', 'break continue if TRUTHVALUE'),
1856 'with': ('with', 'CONTEXTMANAGERS EXCEPTIONS yield'),
1857 'yield': ('yield', ''),
1858 }
1859 # Either add symbols to this dictionary or to the symbols dictionary
1860 # directly: Whichever is easier. They are merged later.
1861 _strprefixes = [p + q for p in ('b', 'f', 'r', 'u') for q in ("'", '"')]
1862 _symbols_inverse = {
1863 'STRINGS' : ("'", "'''", '"', '"""', *_strprefixes),
1864 'OPERATORS' : ('+', '-', '*', '**', '/', '//', '%', '<<', '>>', '&',
1865 '|', '^', '~', '<', '>', '<=', '>=', '==', '!=', '<>'),
1866 'COMPARISON' : ('<', '>', '<=', '>=', '==', '!=', '<>'),

Callers 2

pydoc.pyFile · 0.85
html_topicpageFunction · 0.85

Calls 2

itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…