]> granicus.if.org Git - python/commitdiff
Documented brand new behavior of sys.ps1 and sys.ps2 (str() is applied
authorGuido van Rossum <guido@python.org>
Tue, 25 Nov 1997 21:12:27 +0000 (21:12 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 25 Nov 1997 21:12:27 +0000 (21:12 +0000)
to get the actual prompt).

Doc/lib/libsys.tex
Doc/libsys.tex

index 1e256af75d3130c799d993b53032577a94d90d94..46c0186e5dac64e9f30a948d03b7b4defc51b8af 100644 (file)
@@ -167,7 +167,10 @@ where \emph{VER} is equal to \code{sys.version[:3]}.
   Strings specifying the primary and secondary prompt of the
   interpreter.  These are only defined if the interpreter is in
   interactive mode.  Their initial values in this case are
-  \code{'>>> '} and \code{'... '}.
+  \code{'>>> '} and \code{'... '}.  If a non-string object is assigned
+  to either variable, its \code{str()} is re-evaluated each time the
+  interpreter prepares to read a new interactive command; this can be
+  used to implement a dynamic prompt.
 \end{datadesc}
 
 \begin{funcdesc}{setcheckinterval}{interval}
index 1e256af75d3130c799d993b53032577a94d90d94..46c0186e5dac64e9f30a948d03b7b4defc51b8af 100644 (file)
@@ -167,7 +167,10 @@ where \emph{VER} is equal to \code{sys.version[:3]}.
   Strings specifying the primary and secondary prompt of the
   interpreter.  These are only defined if the interpreter is in
   interactive mode.  Their initial values in this case are
-  \code{'>>> '} and \code{'... '}.
+  \code{'>>> '} and \code{'... '}.  If a non-string object is assigned
+  to either variable, its \code{str()} is re-evaluated each time the
+  interpreter prepares to read a new interactive command; this can be
+  used to implement a dynamic prompt.
 \end{datadesc}
 
 \begin{funcdesc}{setcheckinterval}{interval}