Author ztane
Recipients mjpieters, ztane
Date 2017-11-22.11:12:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511349175.02.0.213398074469.issue32112@psf.upfronthosting.co.za>
In-reply-to
Content
I've been hit by this too, in similar contexts, and several times. It is really annoying that it is easier to coerce an UUID or UUID-string to a string than to coerce to a UUID. Usually when the copy semantics are clear and the class is plain old data, Python lets you execute the constructor with an instance of the same class:

    >>> bytes(bytes())
    b''
    >>> bytearray(bytearray())
    bytearray(b'')
    >>> int(int())
    0
    >>> complex(complex())
    0j
    >>> tuple(tuple())
    ()

I don't to see why this shouldn't be true with UUID as well.
History
Date User Action Args
2017-11-22 11:12:55ztanesetrecipients: + ztane, mjpieters
2017-11-22 11:12:55ztanesetmessageid: <1511349175.02.0.213398074469.issue32112@psf.upfronthosting.co.za>
2017-11-22 11:12:55ztanelinkissue32112 messages
2017-11-22 11:12:54ztanecreate