Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update uuid.py
  • Loading branch information
LamentXU123 authored Aug 15, 2025
commit b3a976c063be124e58dc807ac0cd2e4743ced61d
13 changes: 13 additions & 0 deletions Lib/uuid.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
>>> uuid.uuid5(uuid.NAMESPACE_DNS, 'python.org')
UUID('886313e1-3b8a-5372-9b90-0c9aee199e5d')

# make a UUID based on the host ID and current time
# reordered for improved DB locality
>>> uuid.uuid6()
UUID('1f0799c0-98b9-62db-92c6-a0d365b91053')

# make a UUID using time-ordered value field
>>> uuid.uuid7()
UUID('0198ac49-534e-7149-941a-12f66dec646a')

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

# make a UUID from a string of hex digits (braces and hyphens ignored)
>>> x = uuid.UUID('{00010203-0405-0607-0809-0a0b0c0d0e0f}')

Expand Down
Loading