@@ -896,9 +896,10 @@ mainly contained in information units, such as the language reference.
896896
897897 .. index::
898898 single: execution; context
899- module: __main__
900- module: sys
899+ pair: module; __main__
900+ pair: module; sys
901901 triple: module; search; path
902+ seealso: scope
902903
903904 The execution context
904905 ---------------------
@@ -916,25 +917,63 @@ mainly contained in information units, such as the language reference.
916917 The possible entry types are:
917918
918919 single
919- Creates a single index entry. Can be made a subentry by separating the
920- subentry text with a semicolon (this notation is also used below to
921- describe what entries are created).
920+ Creates a single index entry.
921+ Can be made a sub-entry by separating the sub-entry text with a semicolon
922+ (this notation is also used below to describe what entries are created).
923+ Examples:
924+
925+ .. code :: reStructuredText
926+
927+ .. index:: single: execution
928+ single: execution; context
929+
930+ - ``single: execution `` creates an index entry labelled ``execution ``.
931+ - ``single: execution; context `` creates an sub-entry of ``execution ``
932+ labelled ``context ``.
922933 pair
923- ``pair: loop; statement `` is a shortcut that creates two index entries,
924- namely ``loop; statement `` and ``statement; loop ``.
934+ A shortcut to create two index entries.
935+ The pair of values must be separated by a semicolon.
936+ Example:
937+
938+ .. code :: reStructuredText
939+
940+ .. index:: pair: loop; statement
941+
942+ This would create two index entries; ``loop; statement `` and ``statement; loop ``.
925943 triple
926- Likewise, ``triple: module; search; path `` is a shortcut that creates
927- three index entries, which are ``module; search path ``, ``search; path,
928- module `` and ``path; module search ``.
944+ A shortcut to create three index entries.
945+ All three values must be separated by a semicolon.
946+ Example:
947+
948+ .. code :: reStructuredText
949+
950+ .. index:: triple: module; search; path
951+
952+ This would create three index entries; ``module; search path ``,
953+ ``search; path, module ``, and ``path; module search ``.
929954 see
930- ``see: entry; other `` creates an index entry that refers from ``entry `` to
931- ``other ``.
955+ A shortcut to create an index entry that refers to another entry.
956+ Example:
957+
958+ .. code :: reStructuredText
959+
960+ .. index:: see: entry; other
961+
962+ This would create an index entry referring from ``entry `` to ``other ``
963+ (i.e. 'entry': See 'other').
932964 seealso
933- Like ``see ``, but inserts " see also" instead of " see" .
965+ Like ``see ``, but inserts ' see also' instead of ' see' .
934966 module, keyword, operator, object, exception, statement, builtin
935- These all create two index entries. For example, ``module: hashlib ``
936- creates the entries ``module; hashlib `` and ``hashlib; module ``. (These
937- are Python-specific and therefore deprecated.)
967+ These **deprecated ** shortcuts all create two index entries.
968+ For example, ``module: hashlib `` creates the entries ``module; hashlib ``
969+ and ``hashlib; module ``.
970+
971+ .. deprecated :: 1.0
972+ These Python-specific entry types are deprecated.
973+
974+ .. versionchanged :: 7.1
975+ Removal version set to Sphinx 9.0.
976+ Using these entry types will now emit warnings with the ``index `` category.
938977
939978 You can mark up "main" index entries by prefixing them with an exclamation
940979 mark. The references to "main" entries are emphasized in the generated
0 commit comments