[docs] [issue18011] Inconsistency between b32decode() documentation, docstring and code

Serhiy Storchaka report at bugs.python.org
Sun May 19 10:19:09 CEST 2013


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 at python
components: Documentation, Library (Lib)
messages: 189571
nosy: barry, docs at 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 <report at bugs.python.org>
<http://bugs.python.org/issue18011>
_______________________________________


More information about the docs mailing list