Skip to content
  • stijn's avatar
    py/objstr: Use better msg in bad implicit str/bytes conversion exception · bf29fe2e
    stijn authored
    Instead of always reporting some object cannot be implicitly be converted
    to a 'str', even when it is a 'bytes' object, adjust the logic so that
    when trying to convert str to bytes it is shown like that.
    This will still report bad implicit conversion from e.g. 'int to bytes'
    as 'int to str' but it will not result in the confusing
    'can't convert 'str' object to str implicitly' anymore for calls like
    b'somestring'.count('a').
    bf29fe2e