New submission from Terry J. Reedy <[EMAIL PROTECTED]>: In 3.0b1, several str methods have 'Unicode' in their docstrings leftover from 2.x when str *was* unicode.
For center count ljust rjust translate 'Unicode' should be deleted before 'string'. For 'translate', I presume 'Unicode ordinal' should be left as is as was done for 'maketrans'. For lstrip rstrip strip "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 automatically converted. Other fixes For maketrans 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. For lstrip rstrip strip remove ', Unicode' from "TypeError: <x>strip arg must be None, unicode or str" For ljust rjust "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 implicitly" The other methods taking str args seem to have been updated already. ---------- assignee: georg.brandl components: Documentation keywords: easy messages: 69263 nosy: georg.brandl, tjreedy severity: normal status: open title: Delete obsolete 'Unicode' in Py3 str docstrings; related fixes versions: Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3284> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com