This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Lennart Grahl
Recipients Lennart Grahl, docs@python
Date 2016-05-25.15:42:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464190951.12.0.309980767012.issue27124@psf.upfronthosting.co.za>
In-reply-to
Content
When using binascii.a2b_hex (or binascii.unhexlify) and the argument is invalid, the doc states that it should raise a TypeError for invalid arguments (e.g. passing an odd-length string).

However, it does raise binascii.Error instead of TypeError:

try:
    binascii.a2b_hex('a')
except Exception as exc:
    print(type(exc))
History
Date User Action Args
2016-05-25 15:42:31Lennart Grahlsetrecipients: + Lennart Grahl, docs@python
2016-05-25 15:42:31Lennart Grahlsetmessageid: <1464190951.12.0.309980767012.issue27124@psf.upfronthosting.co.za>
2016-05-25 15:42:31Lennart Grahllinkissue27124 messages
2016-05-25 15:42:31Lennart Grahlcreate