]> granicus.if.org Git - python/commitdiff
#5348: format() converts all kinds of values.
authorGeorg Brandl <georg@python.org>
Mon, 23 Feb 2009 10:24:05 +0000 (10:24 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 23 Feb 2009 10:24:05 +0000 (10:24 +0000)
Doc/library/functions.rst

index b735c8f3678778ae19ea096f09fd68f8cabcbab1..e1436f8174eb9a24719eb3b99c115e323e895187 100644 (file)
@@ -415,14 +415,15 @@ are always available.  They are listed here in alphabetical order.
       pair: str; format
       single: __format__
 
-   Convert a string or a number to a "formatted" representation, as controlled
-   by *format_spec*.  The interpretation of *format_spec* will depend on the
-   type of the *value* argument, however there is a standard formatting syntax
-   that is used by most built-in types: :ref:`formatspec`.
+   Convert a *value* to a "formatted" representation, as controlled by
+   *format_spec*.  The interpretation of *format_spec* will depend on the type
+   of the *value* argument, however there is a standard formatting syntax that
+   is used by most built-in types: :ref:`formatspec`.
 
    .. note::
 
-      ``format(value, format_spec)`` merely calls ``value.__format__(format_spec)``.
+      ``format(value, format_spec)`` merely calls
+      ``value.__format__(format_spec)``.
 
 
 .. function:: frozenset([iterable])