Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Commitb9f814c
authored
The random module now imports the _sha2 module lazily in theRandom.seed() method for str, bytes and bytearray seeds. It alsoimports lazily the warnings module in the _randbelow() method forclasses without getrandbits(). Lazy import makes Python startupfaster and reduces the number of imported modules at startup.
1 parent0802fd6 commitb9f814c
1 file changed
+15
-11
lines changedLines changed: 15 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
54 | 53 |
| |
55 | 54 |
| |
56 | 55 |
| |
| |||
63 | 62 |
| |
64 | 63 |
| |
65 | 64 |
| |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 | 65 |
| |
74 | 66 |
| |
75 | 67 |
| |
| |||
105 | 97 |
| |
106 | 98 |
| |
107 | 99 |
| |
| 100 | + | |
108 | 101 |
| |
109 | 102 |
| |
110 | 103 |
| |
| |||
159 | 152 |
| |
160 | 153 |
| |
161 | 154 |
| |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 |
| |
163 | 166 |
| |
164 | 167 |
| |
| |||
257 | 260 |
| |
258 | 261 |
| |
259 | 262 |
| |
260 |
| - | |
261 |
| - | |
262 |
| - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
263 | 267 |
| |
264 | 268 |
| |
265 | 269 |
| |
|
0 commit comments
Comments
(0)