diff --git a/Doc/perl/python.perl b/Doc/perl/python.perl
index 7b58d6a0de1f..39c99317e059 100644
--- a/Doc/perl/python.perl
+++ b/Doc/perl/python.perl
@@ -906,6 +906,17 @@ sub do_env_classdesc{
return handle_classlike_descriptor(@_[0], "class");
}
+sub do_env_classdescstar{
+ local($_) = @_;
+ $THIS_CLASS = next_argument();
+ $idx = make_str_index_entry(
+ "$THIS_CLASS (class in $THIS_MODULE)" );
+ $idx =~ s/ \(.*\)//;
+ return ("
- class $idx\n
- "
+ . $_
+ . '
');
+}
+
sub do_env_excclassdesc{
return handle_classlike_descriptor(@_[0], "exception");
}
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 795882d64da1..35f7727959c0 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -623,6 +623,15 @@
\index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}]
}{\end{fulllineitems}}
+% \begin{classdesc*}{name}
+\newenvironment{classdesc*}[1]{
+ % Using \renewcommand doesn't work for this, for unknown reasons:
+ \global\def\py@thisclass{#1}
+ \begin{fulllineitems}
+ \item[\strong{class }\code{\bfcode{#1}}%
+ \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}]
+}{\end{fulllineitems}}
+
% \begin{excclassdesc}{name}{constructor args}
% but indexes as an exception
\newenvironment{excclassdesc}[2]{
@@ -633,6 +642,9 @@
\index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}]
}{\end{fulllineitems}}
+% There is no corresponding {excclassdesc*} environment. To describe
+% a class exception without parameters, use the {excdesc} environment.
+
\let\py@classbadkey=\@undefined