diff options
author | MonadChains <monadchains@gmail.com> | 2023-03-23 23:42:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-23 23:42:43 (GMT) |
commit | 413b7db8a480ea6e0d3e8c9729502282ca748a84 (patch) | |
tree | 605e3b2e78cddf41558d7e0b0f010496f33cceee /Doc/library/uuid.rst | |
parent | f1e3eeebc01941f9c25bca4d2fa6313cf5041cc4 (diff) | |
download | cpython-413b7db8a480ea6e0d3e8c9729502282ca748a84.zip cpython-413b7db8a480ea6e0d3e8c9729502282ca748a84.tar.gz cpython-413b7db8a480ea6e0d3e8c9729502282ca748a84.tar.bz2 |
gh-94684: uuid: support bytes in the name argument to uuid3/5 (#94709)
RFC 4122 does not specify that name should be a string, so for completness the functions should also support a name given as a raw byte sequence.
Diffstat (limited to 'Doc/library/uuid.rst')
-rw-r--r-- | Doc/library/uuid.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index 38b6434..94b9a43 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -186,7 +186,8 @@ The :mod:`uuid` module defines the following functions: .. function:: uuid3(namespace, name) Generate a UUID based on the MD5 hash of a namespace identifier (which is a - UUID) and a name (which is a string). + UUID) and a name (which is a :class:`bytes` object or a string + that will be encoded using UTF-8). .. index:: single: uuid3 @@ -201,7 +202,8 @@ The :mod:`uuid` module defines the following functions: .. function:: uuid5(namespace, name) Generate a UUID based on the SHA-1 hash of a namespace identifier (which is a - UUID) and a name (which is a string). + UUID) and a name (which is a :class:`bytes` object or a string + that will be encoded using UTF-8). .. index:: single: uuid5 |