[New-bugs-announce] [issue3284] Delete obsolete 'Unicode' in Py3 str docstrings; related fixes
Terry J. Reedy
report at bugs.python.org
Fri Jul 4 21:26:09 CEST 2008
New submission from Terry J. Reedy <tjreedy at udel.edu>:
In 3.0b1, several str methods have 'Unicode' in their docstrings
leftover from 2.x when str *was* unicode.
'Unicode' should be deleted before 'string'.
For 'translate', I presume 'Unicode ordinal' should be left as is as was
done for 'maketrans'.
"If chars is a str, it will be converted to unicode before stripping"
should be deleted. Bytes (which replace old str) and bytearrays are not
the word 'then' should be removed from 'will then be' in the fourth line
since it only confuses. The conversion is the first and only thing done
in the one-argument case.
remove ', Unicode' from
"TypeError: <x>strip arg must be None, unicode or str"
"TypeError: The fill character cannot be converted to Unicode"
should be changed to
TypeError: The fill character cannot be implicitly converted to str"
or even, copying from several other method error messages
TypeError: Can't convert 'bytes' object to str implicitly"
or perhaps best would be
"TypeError: For the fill char, can't convert 'bytes' object to str
The other methods taking str args seem to have been updated already.
nosy: georg.brandl, tjreedy
title: Delete obsolete 'Unicode' in Py3 str docstrings; related fixes
versions: Python 3.0
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce