summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/texinputs/python.sty3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty
index 0df36023e7..c49e7bf082 100644
--- a/Doc/texinputs/python.sty
+++ b/Doc/texinputs/python.sty
@@ -502,7 +502,8 @@
% classes ----------------------------------------------------------------
% \begin{classdesc}{name}{constructor args}
\newenvironment{classdesc}[2]{
- \renewcommand{\py@thisclass}{#1}
+ % Using \renewcommand doesn't work for this, for unknown reasons:
+ \global\def\py@thisclass{#1}
\begin{fulllineitems}
\item[\code{\bfcode{#1}(\py@varvars{#2})}%
\withsubitem{(class in \py@thismodule)}{\ttindex{#1}}]