Closed dirk-thomas closed 6 years ago
I don't think this should / need to be a function. Also the check for the Python version isn't necessary. I would rather revert the last commit and apply the fix to the other locations.
I don't see an issue with having a function, since we're doing the same thing in so many places.
Also, I'm not sure if the check is necessary or not, but at least it preserves the previous behavior. In Python2, the result was always a str
, but once you call decode()
on it, then it will be a unicode
. That's why I didn't say anything when reviewing it, even if I suspected that it might not be necessary.
Fixes #224.