Message397976
Primitives usually accept an instance of their own type in the constructor, for example:
int(5)
str("a")
tuple((1,2,3))
This is not the case for UUID:
>>> from uuid import uuid4, UUID
>>> x = uuid4()
>>> UUID(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python@3.8/3.8.11/Frameworks/Python.framework/Versions/3.8/lib/python3.8/uuid.py", line 168, in __init__
hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'UUID' object has no attribute 'replace' |
|
Date |
User |
Action |
Args |
2021-07-22 06:08:23 | tzach | set | recipients:
+ tzach |
2021-07-22 06:08:23 | tzach | set | messageid: <1626934103.22.0.511029110243.issue44706@roundup.psfhosted.org> |
2021-07-22 06:08:23 | tzach | link | issue44706 messages |
2021-07-22 06:08:23 | tzach | create | |
|