[Python-bugs-list] [ python-Bugs-706546 ] u''.translate not documented

SourceForge.net noreply@sourceforge.net
Thu, 20 Mar 2003 01:15:18 -0800


Bugs item #706546, was opened at 2003-03-19 22:35
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=706546&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Martijn Pieters (mjpieters)
Assigned to: Nobody/Anonymous (nobody)
Summary: u''.translate not documented

Initial Comment:
The behaviour of u''.translate is significantly
different from ''.translate, yet the difference is not
reflected in the documentation.

- ''.translate takes one or two arguments, one a table
of 256 characters for the translation target and the
other a string containing characters to be removed.

- u''.translate only takes on argument, which is a
mapping from unicode ordinal to unicode ordinal,
ustring or None.

See also print u''.translate.__doc__

----------------------------------------------------------------------

>Comment By: M.-A. Lemburg (lemburg)
Date: 2003-03-20 10:15

Message:
Logged In: YES 
user_id=38388

Isn't the documentation clear enough about the difference ?

Note that u.translate() is not really all that useful. You
are much
better off with writing your own charmap based codec which
is not really difficult: just take a look at e.g. cp1251.py.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=706546&group_id=5470