4 ms·
> if all strings in Mercurial are byte strings, then what is there to think about? just use b'' throughout, no need to worry about anything else. The author ex
by markbnj 7y ago
> if all strings in Mercurial are byte strings, then what is there to think about? just use b'' throughout, no need to worry about anything else.
The author explains later in the article that many system level python 3 apis that are important to a vcs require unicode and won't accept bytes. So apparently it wasn't as easy as just sticking 'b' in front of every literal.
- int_19h 7y agoRight. But that's a very different issue, and it's not at all about string literals as such. Furthermore, the way they solve it - by using their own wrapper helpers that allow bytes - means that the end result should be b'' throughout, no?