[docs] [issue11681] -b option undocumented

Nick Coghlan report at bugs.python.org
Wed Jan 11 22:06:54 EST 2017

Nick Coghlan added the comment:

Right, the lack of transitivity comes from the fact that:

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

Is really shorthand for:

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

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")


Python tracker <report at bugs.python.org>

More information about the docs mailing list