Message198946
| Author |
vajrasky |
| Recipients |
docs@python, makronized, vajrasky |
| Date |
2013年10月04日.13:01:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1380891670.1.0.384800629586.issue19164@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The exception message is correct. You can give an integer argument. But you have to use keyword argument.
>>> uuid.UUID(int=uuid.uuid4().int)
UUID('62ad61e5-b492-4f01-81e6-790049051c4f')
From the documentation:
__init__(self, hex=None, bytes=None, bytes_le=None, fields=None, int=None, v
ersion=None)
| Create a UUID from either a string of 32 hexadecimal digits,
| a string of 16 bytes as the 'bytes' argument, a string of 16 bytes
| in little-endian order as the 'bytes_le' argument, a tuple of six
| integers (32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,
| 8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as
| the 'fields' argument, or a single 128-bit integer as the 'int'
| argument. When a string of hex digits is given, curly braces,
| hyphens, and a URN prefix are all optional. For example, these
| expressions all yield the same UUID: |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年10月04日 13:01:10 | vajrasky | set | recipients:
+ vajrasky, docs@python, makronized |
| 2013年10月04日 13:01:10 | vajrasky | set | messageid: <1380891670.1.0.384800629586.issue19164@psf.upfronthosting.co.za> |
| 2013年10月04日 13:01:10 | vajrasky | link | issue19164 messages |
| 2013年10月04日 13:01:09 | vajrasky | create |
|