[issue38619] [Doc] UUID.hex is lowercase
New submission from Felipe <felipe.nospam.ochoa@gmail.com>: The hex property of `UUID` is implemented as `'%032x' % self.int` Is it specified that this will always be lowercase? If so, can we add a note to the documentation indicating so? ---------- assignee: docs@python components: Documentation, Library (Lib) messages: 355553 nosy: docs@python, fov priority: normal severity: normal status: open title: [Doc] UUID.hex is lowercase type: enhancement versions: Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38619> _______________________________________
Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment: There are examples which show the hex is lowercase. I do not think a special note is needed. All conversions to hex are lowercase by default. If you need uppercase, you can use str.upper(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38619> _______________________________________
Eric V. Smith <eric@trueblade.com> added the comment: Yes, it's always guaranteed to be lowercase. I don't think it would hurt to mention lowercase briefly (like add just one word!). ---------- nosy: +eric.smith _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38619> _______________________________________
Fred Drake <fdrake@gmail.com> added the comment: While I don't know Felipe's use case, I would expect the documentation to be clear that the representation won't change in the future so users will know that this can be relied on to generate keys into some other persistent structure. ---------- nosy: +fdrake _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue38619> _______________________________________
participants (4)
-
Eric V. Smith
-
Felipe
-
Fred Drake
-
Serhiy Storchaka