Message189571
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). |
|
Date |
User |
Action |
Args |
2013-05-19 08:19:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, barry, docs@python |
2013-05-19 08:19:09 | serhiy.storchaka | set | messageid: <1368951549.72.0.00589705304437.issue18011@psf.upfronthosting.co.za> |
2013-05-19 08:19:09 | serhiy.storchaka | link | issue18011 messages |
2013-05-19 08:19:08 | serhiy.storchaka | create | |
|