This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [Doc] UUID.hex is lowercase
Type: enhancement Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, docs@python, eric.smith, fdrake, fov, miss-islington, serhiy.storchaka, wangjiahua
Priority: normal Keywords: patch

Created on 2019-10-28 15:50 by fov, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29830 merged wangjiahua, 2021-11-29 05:48
PR 31334 merged miss-islington, 2022-02-14 18:58
PR 31335 merged miss-islington, 2022-02-14 18:58
Messages (8)
msg355553 - (view) Author: Felipe (fov) * Date: 2019-10-28 15:50
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?
msg355555 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-10-28 15:58
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().
msg355567 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2019-10-28 16:55
Yes, it's always guaranteed to be lowercase. I don't think it would hurt to mention lowercase briefly (like add just one word!).
msg355576 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2019-10-28 17:49
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.
msg413248 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2022-02-14 18:58
New changeset 5d53cf30f9cb3758849e859db5d4602cb7c521f7 by 180909 in branch 'main':
bpo-38619: Update the documentation for UUID.hex (GH-29830)
https://github.com/python/cpython/commit/5d53cf30f9cb3758849e859db5d4602cb7c521f7
msg413249 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2022-02-14 18:59
Thanks. I do think it is helpful to state that it is lowercase.
I have merged the PR, and will backport to 3.10 and 3.9.

Thanks.
msg413254 - (view) Author: miss-islington (miss-islington) Date: 2022-02-14 19:20
New changeset 828253227efe16f0e759df36bbb2ca49083223c8 by Miss Islington (bot) in branch '3.10':
bpo-38619: Update the documentation for UUID.hex (GH-29830)
https://github.com/python/cpython/commit/828253227efe16f0e759df36bbb2ca49083223c8
msg413255 - (view) Author: miss-islington (miss-islington) Date: 2022-02-14 19:25
New changeset 1953f03174c18f315aca883babc3819828f868d8 by Miss Islington (bot) in branch '3.9':
bpo-38619: Update the documentation for UUID.hex (GH-29830)
https://github.com/python/cpython/commit/1953f03174c18f315aca883babc3819828f868d8
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82800
2022-02-14 19:25:34miss-islingtonsetmessages: + msg413255
2022-02-14 19:20:57miss-islingtonsetmessages: + msg413254
2022-02-14 18:59:39Mariattasetstatus: open -> closed
versions: + Python 3.10, Python 3.11
messages: + msg413249

resolution: fixed
stage: patch review -> resolved
2022-02-14 18:58:35miss-islingtonsetpull_requests: + pull_request29488
2022-02-14 18:58:31miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request29487
2022-02-14 18:58:30Mariattasetnosy: + Mariatta
messages: + msg413248
2021-11-29 05:48:29wangjiahuasetkeywords: + patch
nosy: + wangjiahua

pull_requests: + pull_request28061
stage: patch review
2019-10-28 17:49:28fdrakesetnosy: + fdrake
messages: + msg355576
2019-10-28 16:55:30eric.smithsetnosy: + eric.smith
messages: + msg355567
2019-10-28 15:58:09serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg355555
2019-10-28 15:50:18fovcreate