Staging
v0.5.1
https://github.com/python/cpython
Revision 50b458fee254ff397913d49099bba35840b2fab7 authored by Michael W. Hudson on 25 March 2002, 13:11:31 UTC, committed by Michael W. Hudson on 25 March 2002, 13:11:31 UTC
    revision 1.59 of pydoc.py

Remove unnecessary \b.  It was causing the RE to miss the tailing
slash on strings like "http://www.python.org/ is good".
1 parent 1deeef2
Raw File
Tip revision: 50b458fee254ff397913d49099bba35840b2fab7 authored by Michael W. Hudson on 25 March 2002, 13:11:31 UTC
backport nascheme's checkin of
Tip revision: 50b458f
rand.py
# Module 'rand'
# Don't use unless you want compatibility with C's rand()!

import whrandom

def srand(seed):
	whrandom.seed(seed%256, seed/256%256, seed/65536%256)

def rand():
	return int(whrandom.random() * 32768.0) % 32768

def choice(seq):
	return seq[rand() % len(seq)]
back to top