This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tzach
Recipients tzach
Date 2021-07-22.06:08:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626934103.22.0.511029110243.issue44706@roundup.psfhosted.org>
In-reply-to
Content
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'
History
Date User Action Args
2021-07-22 06:08:23tzachsetrecipients: + tzach
2021-07-22 06:08:23tzachsetmessageid: <1626934103.22.0.511029110243.issue44706@roundup.psfhosted.org>
2021-07-22 06:08:23tzachlinkissue44706 messages
2021-07-22 06:08:23tzachcreate