]> granicus.if.org Git - python/commit
Make string.translate(s, table) work for Unicode s. Two things are
authorGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 02:39:08 +0000 (02:39 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 19 Dec 2000 02:39:08 +0000 (02:39 +0000)
commit5aff7752eb28c6ddaa68738ee77e1947b72e1a58
tree1be49fbf54cca165facab28d2e08856926e0bf50
parentcda4f9a8dca961f9047eb6c5cbe647cec507e1a1
Make string.translate(s, table) work for Unicode s.  Two things are
required to work around restrictions on the arguments of
u.translate():

1) don't pass the deletions argument if it's empty;

2) convert table to Unicode if s is Unicode.

This fixes SF bug #124060.
Lib/string.py