This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients georg.brandl, terry.reedy
Date 2008-07-04.19:26:06
SpamBayes Score 0.014715437
Marked as misclassified No
Message-id <1215199569.07.0.941434192746.issue3284@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-07-04 19:26:09terry.reedysetspambayes_score: 0.0147154 -> 0.014715437
recipients: + terry.reedy, georg.brandl
2008-07-04 19:26:09terry.reedysetspambayes_score: 0.0147154 -> 0.0147154
messageid: <1215199569.07.0.941434192746.issue3284@psf.upfronthosting.co.za>
2008-07-04 19:26:07terry.reedylinkissue3284 messages
2008-07-04 19:26:07terry.reedycreate