Skip to content

Commit 98a08aa

Browse files
Apply review suggestion: state getrandom()/getentropy() order
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 2f80e46 commit 98a08aa

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎Doc/library/os.rst‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6466,14 +6466,12 @@ Random numbers
64666466
random bytes in non-blocking mode (using the :data:`GRND_NONBLOCK` flag) or
64676467
to poll until the system urandom entropy pool is initialized.
64686468

6469-
On other Unix-like systems, the C ``getrandom()`` or ``getentropy()``
6470-
function is used if it is available, for example ``getentropy()`` on OpenBSD
6471-
and on macOS 10.12 and newer.
6469+
On other Unix-like systems, the C ``getrandom()`` function is used if it is
6470+
available, otherwise the C ``getentropy()`` function.
64726471

6473-
On any Unix-like system, if none of these functions can be used, random
6474-
bytes are read from the ``/dev/urandom`` device. If the ``/dev/urandom``
6475-
device is not available or not readable, the :exc:`NotImplementedError`
6476-
exception is raised.
6472+
If none of these functions can be used, random bytes are read from the
6473+
``/dev/urandom`` device. If the ``/dev/urandom`` device is not available or
6474+
not readable, the :exc:`NotImplementedError` exception is raised.
64776475

64786476
On Windows, it will use ``BCryptGenRandom()``.
64796477

0 commit comments

Comments
 (0)