mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 03:22:27 +00:00 
			
		
		
		
	letter and end with proper punctuation. "Documenting Python" will be updated accordingly so that this will be editorial policy for the Python documentation.
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			922 B
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			922 B
		
	
	
	
		
			TeX
		
	
	
	
	
	
\section{\module{rand} ---
 | 
						|
         None}
 | 
						|
\declaremodule{standard}{rand}
 | 
						|
 | 
						|
\modulesynopsis{None}
 | 
						|
 | 
						|
 | 
						|
The \code{rand} module simulates the C library's \code{rand()}
 | 
						|
interface, though the results aren't necessarily compatible with any
 | 
						|
given library's implementation.  While still supported for
 | 
						|
compatibility, the \code{rand} module is now considered obsolete; if
 | 
						|
possible, use the \code{whrandom} module instead.
 | 
						|
 | 
						|
 | 
						|
\begin{funcdesc}{choice}{seq}
 | 
						|
Returns a random element from the sequence \var{seq}.
 | 
						|
\end{funcdesc}
 | 
						|
 | 
						|
\begin{funcdesc}{rand}{}
 | 
						|
Return a random integer between 0 and 32767, inclusive.
 | 
						|
\end{funcdesc}
 | 
						|
 | 
						|
\begin{funcdesc}{srand}{seed}
 | 
						|
Set a starting seed value for the random number generator; \var{seed}
 | 
						|
can be an arbitrary integer. 
 | 
						|
\end{funcdesc}
 | 
						|
 | 
						|
\begin{seealso}
 | 
						|
  \seemodule{random}{Python's interface to random number generators.}
 | 
						|
  \seemodule{whrandom}{The random number generator used by default.}
 | 
						|
\end{seealso}
 |