New submission from Serhiy Storchaka:

b32decode() documentation says: "A TypeError is raised if s were incorrectly 
padded or if there are non-alphabet characters present in the string."

b32decode() docstring says: "binascii.Error is raised if the input is 
incorrectly padded or if there are non-alphabet characters present in the 
input."

Actually binascii.Error (which is a ValueError subtype) is raised if the input 
is incorrectly padded and TypeError is raised if there are non-alphabet 
characters present in the input.

At least 2 of 3 (documentation, docstring and implementation) should be 
corrected.

Base32 support was originally added in 3cc0d8fd4e2b (TypeError was used 
everywhere) and then modified in eb45f85c4c79 (TypeError was partially changed 
to binascii.Error).

----------
assignee: docs@python
components: Documentation, Library (Lib)
messages: 189571
nosy: barry, docs@python, gvanrossum, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Inconsistency between b32decode() documentation, docstring and code
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18011>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to