Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete obsolete 'Unicode' in Py3 str docstrings; related fixes #47534

Closed
terryjreedy opened this issue Jul 4, 2008 · 2 comments
Closed

Delete obsolete 'Unicode' in Py3 str docstrings; related fixes #47534

terryjreedy opened this issue Jul 4, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir easy

Comments

@terryjreedy
Copy link
Member

BPO 3284
Nosy @birkenfeld, @terryjreedy, @benjaminp

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-07-04.19:55:54.668>
created_at = <Date 2008-07-04.19:26:07.999>
labels = ['easy', 'docs']
title = "Delete obsolete 'Unicode' in Py3 str docstrings; related fixes"
updated_at = <Date 2008-07-04.19:55:54.647>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2008-07-04.19:55:54.647>
actor = 'benjamin.peterson'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-07-04.19:55:54.668>
closer = 'benjamin.peterson'
components = ['Documentation']
creation = <Date 2008-07-04.19:26:07.999>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 3284
keywords = ['easy']
message_count = 2.0
messages = ['69263', '69266']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'terry.reedy', 'benjamin.peterson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue3284'
versions = ['Python 3.0']

@terryjreedy
Copy link
Member Author

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.

@terryjreedy terryjreedy added docs Documentation in the Doc dir easy labels Jul 4, 2008
@benjaminp
Copy link
Contributor

Thanks! Done in r64716.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

No branches or pull requests

3 participants