Skip to content

Commit b082c90

Browse files
committed
Update docs
1 parent 7a169c9 commit b082c90

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Doc/library/uuid.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
This module provides immutable :class:`UUID` objects (the :class:`UUID` class)
1414
and the functions :func:`uuid1`, :func:`uuid3`, :func:`uuid4`, :func:`uuid5` for
15-
generating version 1, 3, 4, 5, and 8 UUIDs as specified in :rfc:`9562`.
15+
generating version 1, 3, 4, 5, and 8 UUIDs as specified in :rfc:`9562` (which
16+
superseeds :rfc:`4122`).
1617

1718
If all you want is a unique ID, you should probably call :func:`uuid1` or
1819
:func:`uuid4`. Note that :func:`uuid1` may compromise privacy since it creates
@@ -172,7 +173,7 @@ The :mod:`uuid` module defines the following functions:
172173
runs, it may launch a separate program, which could be quite slow. If all
173174
attempts to obtain the hardware address fail, we choose a random 48-bit
174175
number with the multicast bit (least significant bit of the first octet)
175-
set to 1 as recommended in :rfc:`9562`. "Hardware address" means the MAC
176+
set to 1 as recommended in :rfc:`4122`. "Hardware address" means the MAC
176177
address of a network interface. On a machine with multiple network
177178
interfaces, universally administered MAC addresses (i.e. where the second
178179
least significant bit of the first octet is *unset*) will be preferred over
@@ -223,7 +224,14 @@ The :mod:`uuid` module defines the following functions:
223224

224225
.. function:: uuid8(a=None, b=None, c=None)
225226

226-
TODO
227+
Generate a pseudo-random UUID according to
228+
:rfc:`RFC 9562, §5.8 <9562#section-5.8>`.
229+
230+
When specified, the parameters *a*, *b* and *c* are expected to be
231+
positive integers of 48, 12 and 62 bits respectively. If they exceed
232+
their expected bit count, only their least significant bits are kept;
233+
non-specified arguments are substituted for a pseudo-random integer of
234+
appropriate size.
227235

228236
.. versionadded:: 3.14
229237

@@ -299,7 +307,7 @@ The :mod:`uuid` module can be executed as a script from the command line.
299307

300308
.. code-block:: sh
301309
302-
python -m uuid [-h] [-u {uuid1,uuid3,uuid4,uuid5}] [-n NAMESPACE] [-N NAME]
310+
python -m uuid [-h] [-u {uuid1,uuid3,uuid4,uuid5,uuid8}] [-n NAMESPACE] [-N NAME]
303311
304312
The following options are accepted:
305313

0 commit comments

Comments
 (0)