@@ -179,8 +179,6 @@ The :mod:`uuid` module defines the following functions:
179
179
administered MAC addresses, since the former are guaranteed to be
180
180
globally unique, while the latter are not.
181
181
182
- .. index :: single: getnode
183
-
184
182
185
183
.. function :: uuid1(node=None, clock_seq=None)
186
184
@@ -189,32 +187,39 @@ The :mod:`uuid` module defines the following functions:
189
187
*clock_seq * is given, it is used as the sequence number; otherwise a random
190
188
14-bit sequence number is chosen.
191
189
192
- .. index :: single: uuid1
193
-
194
190
195
191
.. function :: uuid3(namespace, name)
196
192
197
193
Generate a UUID based on the MD5 hash of a namespace identifier (which is a
198
194
UUID) and a name (which is a :class: `bytes ` object or a string
199
195
that will be encoded using UTF-8).
200
196
201
- .. index :: single: uuid3
202
-
203
197
204
198
.. function :: uuid4()
205
199
206
200
Generate a random UUID.
207
201
208
- .. index :: single: uuid4
209
-
210
202
211
203
.. function :: uuid5(namespace, name)
212
204
213
205
Generate a UUID based on the SHA-1 hash of a namespace identifier (which is a
214
206
UUID) and a name (which is a :class: `bytes ` object or a string
215
207
that will be encoded using UTF-8).
216
208
217
- .. index :: single: uuid5
209
+
210
+ .. function :: uuid8(a=None, b=None, c=None)
211
+
212
+ Generate a pseudo-random UUID according to
213
+ :rfc: `RFC 9562, §5.8 <9562#section-5.8 >`.
214
+
215
+ When specified, the parameters *a *, *b * and *c * are expected to be
216
+ positive integers of 48, 12 and 62 bits respectively. If they exceed
217
+ their expected bit count, only their least significant bits are kept;
218
+ non-specified arguments are substituted for a pseudo-random integer of
219
+ appropriate size.
220
+
221
+ .. versionadded :: 3.14
222
+
218
223
219
224
The :mod: `uuid ` module defines the following namespace identifiers for use with
220
225
:func: `uuid3 ` or :func: `uuid5 `.
0 commit comments