New submission from Lennart Grahl:

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))

----------
assignee: docs@python
components: Documentation
messages: 266368
nosy: Lennart Grahl, docs@python
priority: normal
severity: normal
status: open
title: binascii.a2b_hex raises binascii.Error, not TypeError
type: behavior
versions: Python 3.4

_______________________________________
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

Reply via email to