Title: str.__format__.__doc__ backport glitch
Type: Stage: needs patch
Components: Documentation Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.smith, georg.brandl, terry.reedy
Priority: normal Keywords: easy

Created on 2010-07-21 22:49 by terry.reedy, last changed 2010-07-31 19:07 by georg.brandl. This issue is now closed.

Messages (5)
msg111130 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-07-21 22:49
On Python list, 'jmfauth' reports
>>> >>> sys.version
2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
>>> >>> ''.format.__doc__
S.format(*args, **kwargs) -> unicode

I do not have 2.7 loaded to verify this, but assuming this is accurate,
'unicode' should be 'string'. I presume this is from mistaken conversion of 3.1 'string' to 2.7 'unicode' when backporting the new string format system.
msg111138 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-07-22 00:34
Yes, that is what it says; and yes, it should be "string". Although why all of the methods say "string" and not "str" isn't clear to me. Probably historical.

The doc string for str.__format__ contains the same error.
msg111139 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2010-07-22 00:40
And now that I look at it, the subject contains "__format__" but the original message says "format". Both cases are already covered!
msg111142 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2010-07-22 00:46
On Wed, Jul 21, 2010 at 8:34 PM, Eric Smith <> wrote:
> Although why all of the methods say "string" and not "str" isn't clear to me. Probably historical.

Indeed; we used "string" in the docs as an informal way to say what
eventually became known as basestring.

msg112181 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-31 19:07
Fixed in r83354.
Date User Action Args
2010-07-31 19:07:49georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112181

resolution: fixed
2010-07-22 00:48:10fdrakesetnosy: - fdrake
2010-07-22 00:46:06fdrakesetnosy: + fdrake
messages: + msg111142
2010-07-22 00:40:47eric.smithsetmessages: + msg111139
2010-07-22 00:34:42eric.smithsetnosy: + eric.smith
messages: + msg111138
2010-07-21 22:49:13terry.reedycreate