Skip to content

gh-137847: Add typical usage for uuid 6,7,8 in online documents #137848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Aug 16, 2025

This PR add examples in the online documents (uuid.rst)

(also I add a blank line between the two existing examples.)


📚 Documentation preview 📚: https://cpython-previews--137848.org.readthedocs.build/

>>> # get UUIDv7 creation (local) time as a datetime object
>>> import datetime as dt
>>> dt.datetime.fromtimestamp(u.time / 1000) # doctest: +SKIP
datetime.datetime(...)

>>> # make a UUID using three customizable fields
>>> uuid.uuid8(0x12345678, 0x9abcdef0, 0x11223344)
UUID('00001234-5678-8ef0-8000-000011223344')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep two blank lines after the last example and before the label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants