[13:25:32] <wangofett> I've seen an (un)surprising number of posts about how a large roadblock to upgrades is that most lines of code in business have *no test coverage*
[14:25:02] <ztane> hand checked all division operators...
[14:25:29] <ztane> then ran tests and there were surprisingly few bytes/str confusion
[14:30:19] <wangofett> That's pretty impressive. I've got the difference between bytes/str grokked, but actually remembering what takes/returns what is still something that isn't natural to me
[14:30:43] <wangofett> I keep having to just kind of guess whether it's decode or encode that I need :P
[14:32:02] <ztane> easier on py3, encode is that which you have on str, decode on bytes....
[14:32:12] <ztane> cant go wrong when runing with python3 :D
[15:18:28] <Ivo> wangofett: it should be easy if you've grokked it. If you come across some sort of string, it should be either a unicode string or a byte string. If it's bytes and you want to deal with it as text, you want to *decode* it into unicode. If it's unicode that needs to be output/sent somewhere, you want to *encode* with an encoding into bytes to be transmitted
[15:20:20] <wangofett> Hm. Now to think of a mnemonic to help
[15:25:21] <Ivo> wangofett: I think just make sure you understand one side. The other side will simply be the opposite. e.g if you always remember that "Bytes need to have their meaning decoded from them", then you can figure out in 2 seconds what the corollary process is (unicode needs to be *encoded*)
[23:56:38] <itamar> ztane: yes. did you know python 3 is terrible?
[23:56:51] <itamar> hm, guess that's way past your scroll history