Steven D'Aprano added the comment: In Python 3.x, 'a' is just as much a Unicode string as 'ä'. I agree that binascii.a2b_hex should raise ValueError for argument 'ä', or ';' for that matter, as they are invalid values. There's an inconsistency in why some invalid characters raise ValueError and some raise binascii.Error. But since binascii.Error is a subclass of ValueError, it probably doesn't matter that much, so long as the documentation is clear.
---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27124> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com