[docs] [issue27124] binascii.a2b_hex raises binascii.Error and ValueError, not TypeError
Luiz Poleto
report at bugs.python.org
Wed May 25 23:04:26 EDT 2016
Luiz Poleto added the comment:
binascii.Error is used throughout the module for most of the validations, with only a few of them using TypeError/ValueError. I guess it would make more sense to update these to raise binascii.Error (unless they were left on purpose) to make it consistent with the rest of the module, although changing from TypeError to binascii.Error might break existing code.
Anyway, since a2b_hex is currently raising binascii.Error for an odd-length input, the attached patch fixes the documentation to reflect it.
----------
keywords: +patch
nosy: +luiz.poleto
Added file: http://bugs.python.org/file43009/issue27124.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27124>
_______________________________________
More information about the docs
mailing list