]> granicus.if.org Git - python/commitdiff
Added more to docstrings for str.format, format_map, and __format__.
authorEric Smith <eric@trueblade.com>
Sat, 6 Nov 2010 19:27:37 +0000 (19:27 +0000)
committerEric Smith <eric@trueblade.com>
Sat, 6 Nov 2010 19:27:37 +0000 (19:27 +0000)
Objects/unicodeobject.c

index 35d86009f125abe1b9c324ce0aab6e16d844a5d6..32bcb344f49ee1552ccc9d72da6ee2718ff8e331 100644 (file)
@@ -9026,12 +9026,14 @@ unicode_endswith(PyUnicodeObject *self,
 PyDoc_STRVAR(format__doc__,
              "S.format(*args, **kwargs) -> str\n\
 \n\
-");
+Return a formatted version of S, using substitutions from args and kwargs.\n\
+The substitutions are identified by braces ('{' and '}').");
 
 PyDoc_STRVAR(format_map__doc__,
              "S.format_map(mapping) -> str\n\
 \n\
-");
+Return a formatted version of S, using substitutions from mapping.\n\
+The substitutions are identified by braces ('{' and '}').");
 
 static PyObject *
 unicode__format__(PyObject* self, PyObject* args)
@@ -9049,7 +9051,7 @@ unicode__format__(PyObject* self, PyObject* args)
 PyDoc_STRVAR(p_format__doc__,
              "S.__format__(format_spec) -> str\n\
 \n\
-");
+Return a formatted version of S as described by format_spec.");
 
 static PyObject *
 unicode__sizeof__(PyUnicodeObject *v)