diff options
author | Georg Brandl <georg@python.org> | 2009-08-13 08:47:18 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-08-13 08:47:18 (GMT) |
commit | 7d1e88063c6241d4750326fc772d5b8a6819a77f (patch) | |
tree | 2aece70a7b09bdcbd64d792029c042d3951c534d /Lib | |
parent | 98e472d7fb88e8cf7c7797a879eb63cf3242ed97 (diff) | |
download | cpython-7d1e88063c6241d4750326fc772d5b8a6819a77f.zip cpython-7d1e88063c6241d4750326fc772d5b8a6819a77f.tar.gz cpython-7d1e88063c6241d4750326fc772d5b8a6819a77f.tar.bz2 |
Merged revisions 73656,73658,73663,73666 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r73656 | mark.dickinson | 2009-06-29 00:08:40 +0200 (Mo, 29 Jun 2009) | 1 line
Fix description of range_length_obj
........
r73658 | raymond.hettinger | 2009-06-29 00:30:13 +0200 (Mo, 29 Jun 2009) | 1 line
Small doc fix-ups to floatingpoint.rst. More are forthcoming.
........
r73663 | raymond.hettinger | 2009-06-29 01:21:38 +0200 (Mo, 29 Jun 2009) | 1 line
Clean-up floating point tutorial.
........
r73666 | alexandre.vassalotti | 2009-06-29 03:13:41 +0200 (Mo, 29 Jun 2009) | 2 lines
Make b64encode raises properly a TypeError when altchars is not bytes.
........
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/base64.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/base64.py b/Lib/base64.py index 73e9808..e708136 100755 --- a/Lib/base64.py +++ b/Lib/base64.py @@ -58,8 +58,8 @@ def b64encode(s, altchars=None): encoded = binascii.b2a_base64(s)[:-1] if altchars is not None: if not isinstance(altchars, bytes_types): - altchars = TypeError("expected bytes, not %s" - % altchars.__class__.__name__) + raise TypeError("expected bytes, not %s" + % altchars.__class__.__name__) assert len(altchars) == 2, repr(altchars) return _translate(encoded, {'+': altchars[0:1], '/': altchars[1:2]}) return encoded |