From 819dc965f1f3db4aa65224f0ee85eccf292d1fbc Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:05:05 +0100 Subject: [PATCH] Document `ValueError` being raised by `UUID` constructor --- Doc/library/uuid.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst index aa4f1bf940bc5c..cfdb45864ca599 100644 --- a/Doc/library/uuid.rst +++ b/Doc/library/uuid.rst @@ -66,6 +66,7 @@ which relays any information about the UUID's safety, using this enumeration: UUID(int=0x12345678123456781234567812345678) Exactly one of *hex*, *bytes*, *bytes_le*, *fields*, or *int* must be given. + If any of these arguments are malformed, a :exc:`ValueError` is raised. The *version* argument is optional; if given, the resulting UUID will have its variant and version number set according to :rfc:`9562`, overriding bits in the given *hex*, *bytes*, *bytes_le*, *fields*, or *int*.