golang_str: Make bytes(bstr) -> bstr, unicode(ustr) -> ustr
In other words casting to bytes/unicode preserves pygolang string to remain pygolang string. Without the changes to bstr/ustr added test fails as e.g. > assert bytes (bs) is bs E AssertionError: assert b'\xd0\xbc\xd0\xb8\xd1\x80' is b'\xd0\xbc\xd0\xb8\xd1\x80' E + where b'\xd0\xbc\xd0\xb8\xd1\x80' = bytes(b'\xd0\xbc\xd0\xb8\xd1\x80') in other words bytes(bstr) was creating a copy and changing type to bytes.
Showing
Please register or sign in to comment