Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
81b64ff0
Commit
81b64ff0
authored
Dec 31, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #26267: Merge from 3.6
parents
d489ac91
9db22dd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
Doc/library/uuid.rst
Doc/library/uuid.rst
+7
-0
Lib/test/test_uuid.py
Lib/test/test_uuid.py
+4
-0
No files found.
Doc/library/uuid.rst
View file @
81b64ff0
...
...
@@ -45,6 +45,13 @@ random UUID.
variant and version number set according to RFC 4122, overriding bits in the
given *hex*, *bytes*, *bytes_le*, *fields*, or *int*.
Comparison of UUID objects are made by way of comparing their
:attr:`UUID.int` attributes. Comparison with a non-UUID object
raises a :exc:`TypeError`.
``str(uuid)`` returns a string in the form
``12345678-1234-5678-1234-567812345678`` where the 32 hexadecimal digits
represent the UUID.
:class:`UUID` instances have these read-only attributes:
...
...
Lib/test/test_uuid.py
View file @
81b64ff0
...
...
@@ -292,6 +292,10 @@ class TestUUID(unittest.TestCase):
badtype
(
lambda
:
setattr
(
u
,
'clock_seq_low'
,
0
))
badtype
(
lambda
:
setattr
(
u
,
'node'
,
0
))
# Comparison with a non-UUID object
badtype
(
lambda
:
u
<
object
())
badtype
(
lambda
:
u
>
object
())
def
test_getnode
(
self
):
node1
=
uuid
.
getnode
()
self
.
assertTrue
(
0
<
node1
<
(
1
<<
48
),
'%012x'
%
node1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment