Lines Matching defs:hex
31 # make a UUID from a string of hex digits (braces and hyphens ignored)
34 # convert a UUID to a string of hex digits in standard form
120 hex the UUID as a 32-character hexadecimal string
139 def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
148 argument. When a string of hex digits is given, curly braces,
161 Exactly one of 'hex', 'bytes', 'bytes_le', 'fields', or 'int' must
164 overriding the given 'hex', 'bytes', 'bytes_le', 'fields', or 'int'.
171 if [hex, bytes, bytes_le, fields, int].count(None) != 4:
172 raise TypeError('one of the hex, bytes, bytes_le, fields, '
174 if hex is not None:
175 hex = hex.replace('urn:', '').replace('uuid:', '')
176 hex = hex.strip('{}').replace('-', '')
177 if len(hex) != 32:
179 int = int_(hex, 16)
281 hex = '%032x' % self.int
283 hex[:8], hex[8:12], hex[12:16], hex[16:20], hex[20:])
335 def hex(self):