bytes = codecs.decode(string, "hex")
"TypeError: 'hex' decoder returned 'bytes' instead of 'str'; use codecs.decode() to decode to arbitrary types"
But it must return bytes, and I expect bytes (?!) This is not a type error. Can someone explain why this is happening? There is no such problem with CPython. (+ Ubuntu 18.04 / PyCharm)