Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
011b22f4
Commit
011b22f4
authored
Apr 09, 1998
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relocating file to Lib/lib-old.
parent
46a9efff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
13 deletions
+0
-13
Lib/rand.py
Lib/rand.py
+0
-13
No files found.
Lib/rand.py
deleted
100644 → 0
View file @
46a9efff
# 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
)]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment