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 ncoghlan
Recipients Arfrever, docs@python, emily.zhao, eric.araujo, ezio.melotti, gbengeult, georg.brandl, lemburg, martin.panter, ncoghlan, r.david.murray
Date 2017-01-12.03:06:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484190413.78.0.255991674941.issue11681@psf.upfronthosting.co.za>
In-reply-to
Content
Right, the lack of transitivity comes from the fact that:

    >>> u"3" == str(3)
    True

Is really shorthand for:

    >>> u"3" == str(3).decode("ascii")
    True

However, the implicit decoding only triggers for *exactly* bytes instances, so in the bytearray case it needs to be explicit:

    >>> u"3" == bytearray(b"3").decode("ascii")
    True
History
Date User Action Args
2017-01-12 03:06:54ncoghlansetrecipients: + ncoghlan, lemburg, georg.brandl, ezio.melotti, eric.araujo, Arfrever, r.david.murray, docs@python, martin.panter, emily.zhao, gbengeult
2017-01-12 03:06:53ncoghlansetmessageid: <1484190413.78.0.255991674941.issue11681@psf.upfronthosting.co.za>
2017-01-12 03:06:53ncoghlanlinkissue11681 messages
2017-01-12 03:06:53ncoghlancreate