thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsuke <...@git.apache.org>
Subject [GitHub] thrift issue #1289: fix TypeError when a py3 str is passed to the function.
Date Sun, 29 Oct 2017 13:44:00 GMT
Github user nsuke commented on the issue:

    https://github.com/apache/thrift/pull/1289
  
    Basically yes with some note.
    
    It's typically not a UTF-8 encoded binary. To write utf8 strings we can use `writeString`.
The point is that `writeBinary` is for writing binaries.
    
    The real problem here is that py2 `str` *is* `byte` but py3 `str` is not. This forces
many python users to put this kind of conversions everywhere when migration from 2 to 3. Putting
this in Apache Thrift will save their time, while introducing potential surprises to another
set of users.



---

Mime
View raw message