summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-08-22 07:36:59 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-08-22 07:36:59 (GMT)
commitc85578725bd3aeccfb1e8d55f84057c3cfbb0f54 (patch)
tree2639af25f2f798a802953de8c46afe3fd57dd956 /Doc
parent3c9333970f835ac71d55d3d1b323ad622c5a3beb (diff)
downloadcpython-c85578725bd3aeccfb1e8d55f84057c3cfbb0f54.zip
cpython-c85578725bd3aeccfb1e8d55f84057c3cfbb0f54.tar.gz
cpython-c85578725bd3aeccfb1e8d55f84057c3cfbb0f54.tar.bz2
patch for documentation for recent uuid changes (from ping)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libuuid.tex30
1 files changed, 15 insertions, 15 deletions
diff --git a/Doc/lib/libuuid.tex b/Doc/lib/libuuid.tex
index a9d5295..5aab80c 100644
--- a/Doc/lib/libuuid.tex
+++ b/Doc/lib/libuuid.tex
@@ -18,20 +18,11 @@ may compromise privacy since it creates a UUID containing the computer's
network address. \function{uuid4()} creates a random UUID.
\begin{classdesc}{UUID}{\optional{hex\optional{, bytes\optional{,
-fields\optional{, int\optional{, version}}}}}}
-
-%Instances of the UUID class represent UUIDs as specified in RFC 4122.
-%UUID objects are immutable, hashable, and usable as dictionary keys.
-%Converting a UUID to a string with str() yields something in the form
-%'12345678-1234-1234-1234-123456789abc'. The UUID constructor accepts
-%four possible forms: a similar string of hexadecimal digits, or a
-%string of 16 raw bytes as an argument named 'bytes', or a tuple of
-%six integer fields (with 32-bit, 16-bit, 16-bit, 8-bit, 8-bit, and
-%48-bit values respectively) as an argument named 'fields', or a single
-%128-bit integer as an argument named 'int'.
+bytes_le\optional{, fields\optional{, int\optional{, version}}}}}}}
Create a UUID from either a string of 32 hexadecimal digits,
-a string of 16 bytes as the \var{bytes} argument, a tuple of six
+a string of 16 bytes as the \var{bytes} argument, a string of 16 bytes
+in little-endian order as the \var{bytes_le} argument, a tuple of six
integers (32-bit \var{time_low}, 16-bit \var{time_mid},
16-bit \var{time_hi_version},
8-bit \var{clock_seq_hi_variant}, 8-bit \var{clock_seq_low}, 48-bit \var{node})
@@ -45,22 +36,31 @@ UUID('{12345678-1234-5678-1234-567812345678}')
UUID('12345678123456781234567812345678')
UUID('urn:uuid:12345678-1234-5678-1234-567812345678')
UUID(bytes='\x12\x34\x56\x78'*4)
+UUID(bytes_le='\x78\x56\x34\x12\x34\x12\x78\x56' +
+ '\x12\x34\x56\x78\x12\x34\x56\x78')
UUID(fields=(0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x567812345678))
UUID(int=0x12345678123456781234567812345678)
\end{verbatim}
-Exactly one of \var{hex}, \var{bytes}, \var{fields}, or \var{int} must
+Exactly one of \var{hex}, \var{bytes}, \var{bytes_le}, \var{fields},
+or \var{int} must
be given. The \var{version} argument is optional; if given, the
resulting UUID will have its variant and version number set according to
RFC 4122, overriding bits in the given \var{hex}, \var{bytes},
-\var{fields}, or \var{int}.
+\var{bytes_le}, \var{fields}, or \var{int}.
\end{classdesc}
\class{UUID} instances have these read-only attributes:
\begin{memberdesc}{bytes}
-The UUID as a 16-byte string.
+The UUID as a 16-byte string (containing the six
+integer fields in big-endian byte order).
+\end{memberdesc}
+
+\begin{memberdesc}{bytes_le}
+The UUID as a 16-byte string (with \var{time_low}, \var{time_mid},
+and \var{time_hi_version} in little-endian byte order).
\end{memberdesc}
\begin{memberdesc}{fields}