#5348: format() converts all kinds of values.
This commit is contained in:
parent
9249f8034d
commit
5579ba9183
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue