Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9edd9f0

Browse files
committed
Fix a few links in the table of built-in functions (#12298)
1 parent 8dad187 commit 9edd9f0

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

Doc/library/functions.rst

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ are always available. They are listed here in alphabetical order.
1010
=================== ================= ================== ================ ====================
1111
.. .. Built-in Functions .. ..
1212
=================== ================= ================== ================ ====================
13-
:func:`abs` :func:`dict` :func:`help` :func:`min` :func:`setattr`
13+
:func:`abs` |func-dict|_ :func:`help` :func:`min` :func:`setattr`
1414
:func:`all` :func:`dir` :func:`hex` :func:`next` :func:`slice`
1515
:func:`any` :func:`divmod` :func:`id` :func:`object` :func:`sorted`
1616
:func:`ascii` :func:`enumerate` :func:`input` :func:`oct` :func:`staticmethod`
@@ -19,13 +19,22 @@ are always available. They are listed here in alphabetical order.
1919
:func:`bytearray` :func:`filter` :func:`issubclass` :func:`pow` :func:`super`
2020
:func:`bytes` :func:`float` :func:`iter` :func:`print` :func:`tuple`
2121
:func:`callable` :func:`format` :func:`len` :func:`property` :func:`type`
22-
:func:`chr` :func:`frozenset` :func:`list` :func:`range` :func:`vars`
22+
:func:`chr` |func-frozenset|_ :func:`list` :func:`range` :func:`vars`
2323
:func:`classmethod` :func:`getattr` :func:`locals` :func:`repr` :func:`zip`
2424
:func:`compile` :func:`globals` :func:`map` :func:`reversed` :func:`__import__`
2525
:func:`complex` :func:`hasattr` :func:`max` :func:`round`
26-
:func:`delattr` :func:`hash` :func:`memoryview` :func:`set`
26+
:func:`delattr` :func:`hash` |func-memoryview|_ |func-set|_
2727
=================== ================= ================== ================ ====================
2828

29+
.. using :func:`dict` would create a link to another page, so local targets are
30+
used, with replacement texts to make the output in the table consistent
31+
32+
.. |func-dict| replace:: ``dict()``
33+
.. |func-frozenset| replace:: ``frozenset()``
34+
.. |func-memoryview| replace:: ``memoryview()``
35+
.. |func-set| replace:: ``set()``
36+
37+
2938
.. function:: abs(x)
3039

3140
Return the absolute value of a number. The argument may be an
@@ -248,6 +257,7 @@ are always available. They are listed here in alphabetical order.
248257
example, ``delattr(x, 'foobar')`` is equivalent to ``del x.foobar``.
249258

250259

260+
.. _func-dict:
251261
.. function:: dict([arg])
252262
:noindex:
253263

@@ -491,6 +501,7 @@ are always available. They are listed here in alphabetical order.
491501

492502
The float type is described in :ref:`typesnumeric`.
493503

504+
494505
.. function:: format(value[, format_spec])
495506

496507
.. index::
@@ -511,6 +522,8 @@ are always available. They are listed here in alphabetical order.
511522
:exc:`TypeError` exception is raised if the method is not found or if either
512523
the *format_spec* or the return value are not strings.
513524

525+
526+
.. _func-frozenset:
514527
.. function:: frozenset([iterable])
515528
:noindex:
516529

@@ -717,6 +730,8 @@ are always available. They are listed here in alphabetical order.
717730
such as ``sorted(iterable, key=keyfunc, reverse=True)[0]`` and
718731
``heapq.nlargest(1, iterable, key=keyfunc)``.
719732

733+
734+
.. _func-memoryview:
720735
.. function:: memoryview(obj)
721736
:noindex:
722737

@@ -1108,6 +1123,8 @@ are always available. They are listed here in alphabetical order.
11081123
can't be represented exactly as a float. See :ref:`tut-fp-issues` for
11091124
more information.
11101125

1126+
1127+
.. _func-set:
11111128
.. function:: set([iterable])
11121129
:noindex:
11131130

0 commit comments

Comments
 (0)