[Python-checkins] r86279 - in python/branches/release27-maint/Objects: stringobject.c unicodeobject.c
eric.smith
python-checkins at python.org
Sat Nov 6 20:43:44 CET 2010
Author: eric.smith
Date: Sat Nov 6 20:43:44 2010
New Revision: 86279
Log:
Improved docstrings for str and unicode methods format and __format__.
Modified:
python/branches/release27-maint/Objects/stringobject.c
python/branches/release27-maint/Objects/unicodeobject.c
Modified: python/branches/release27-maint/Objects/stringobject.c
==============================================================================
--- python/branches/release27-maint/Objects/stringobject.c (original)
+++ python/branches/release27-maint/Objects/stringobject.c Sat Nov 6 20:43:44 2010
@@ -3582,7 +3582,8 @@
PyDoc_STRVAR(format__doc__,
"S.format(*args, **kwargs) -> string\n\
\n\
-");
+Return a formatted version of S, using substitutions from args and kwargs.\n\
+The substitutions are identified by braces ('{' and '}').");
static PyObject *
string__format__(PyObject* self, PyObject* args)
@@ -3616,7 +3617,7 @@
PyDoc_STRVAR(p_format__doc__,
"S.__format__(format_spec) -> string\n\
\n\
-");
+Return a formatted version of S as described by format_spec.");
static PyMethodDef
Modified: python/branches/release27-maint/Objects/unicodeobject.c
==============================================================================
--- python/branches/release27-maint/Objects/unicodeobject.c (original)
+++ python/branches/release27-maint/Objects/unicodeobject.c Sat Nov 6 20:43:44 2010
@@ -7728,7 +7728,8 @@
PyDoc_STRVAR(format__doc__,
"S.format(*args, **kwargs) -> unicode\n\
\n\
-");
+Return a formatted version of S, using substitutions from args and kwargs.\n\
+The substitutions are identified by braces ('{' and '}').");
static PyObject *
unicode__format__(PyObject *self, PyObject *args)
@@ -7762,7 +7763,7 @@
PyDoc_STRVAR(p_format__doc__,
"S.__format__(format_spec) -> unicode\n\
\n\
-");
+Return a formatted version of S as described by format_spec.");
static PyObject *
unicode__sizeof__(PyUnicodeObject *v)
More information about the Python-checkins
mailing list