mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Merged revisions 79168-79169 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79168 | georg.brandl | 2010-03-21 10:01:27 +0100 (So, 21 Mär 2010) | 1 line Fix some issues found by Jacques Ducasse on the docs list. ........ r79169 | georg.brandl | 2010-03-21 10:02:01 +0100 (So, 21 Mär 2010) | 1 line Remove the "built-in objects" file. It only contained two paragraphs of which only one contained useful information, which belongs in the ref manual however. ........
This commit is contained in:
parent
482b151caf
commit
1f70cdfe00
5 changed files with 10 additions and 37 deletions
|
|
@ -328,7 +328,7 @@ are always available. They are listed here in alphabetical order.
|
|||
This function can also be used to execute arbitrary code objects (such as
|
||||
those created by :func:`compile`). In this case pass a code object instead
|
||||
of a string. If the code object has been compiled with ``'exec'`` as the
|
||||
*kind* argument, :func:`eval`\'s return value will be ``None``.
|
||||
*mode* argument, :func:`eval`\'s return value will be ``None``.
|
||||
|
||||
Hints: dynamic execution of statements is supported by the :func:`exec`
|
||||
function. The :func:`globals` and :func:`locals` functions
|
||||
|
|
@ -1008,7 +1008,8 @@ are always available. They are listed here in alphabetical order.
|
|||
Has two optional arguments which must be specified as keyword arguments.
|
||||
|
||||
*key* specifies a function of one argument that is used to extract a comparison
|
||||
key from each list element: ``key=str.lower``. The default value is ``None``.
|
||||
key from each list element: ``key=str.lower``. The default value is ``None``
|
||||
(compare the elements directly).
|
||||
|
||||
*reverse* is a boolean value. If set to ``True``, then the list elements are
|
||||
sorted as if each comparison were reversed.
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ the `Python Package Index <http://pypi.python.org/pypi>`_.
|
|||
intro.rst
|
||||
functions.rst
|
||||
constants.rst
|
||||
objects.rst
|
||||
stdtypes.rst
|
||||
exceptions.rst
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
|
||||
.. _builtin:
|
||||
|
||||
****************
|
||||
Built-in Objects
|
||||
****************
|
||||
|
||||
.. index::
|
||||
pair: built-in; types
|
||||
pair: built-in; exceptions
|
||||
pair: built-in; functions
|
||||
pair: built-in; constants
|
||||
single: symbol table
|
||||
|
||||
Names for built-in exceptions and functions and a number of constants are found
|
||||
in a separate symbol table. This table is searched last when the interpreter
|
||||
looks up the meaning of a name, so local and global user-defined names can
|
||||
override built-in names. Built-in types are described together here for easy
|
||||
reference.
|
||||
|
||||
The tables in this chapter document the priorities of operators by listing them
|
||||
in order of ascending priority (within a table) and grouping operators that have
|
||||
the same priority in the same box. Binary operators of the same priority group
|
||||
from left to right. (Unary operators group from right to left, but there you
|
||||
have no real choice.) See :ref:`operator-summary` for the complete picture on
|
||||
operator priorities.
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ supports post-mortem debugging and can be called under program control.
|
|||
|
||||
The debugger is extensible --- it is actually defined as the class :class:`Pdb`.
|
||||
This is currently undocumented but easily understood by reading the source. The
|
||||
extension interface uses the modules :mod:`bdb` (undocumented) and :mod:`cmd`.
|
||||
extension interface uses the modules :mod:`bdb` and :mod:`cmd`.
|
||||
|
||||
The debugger's prompt is ``(Pdb)``. Typical usage to run a program under control
|
||||
of the debugger is::
|
||||
|
|
|
|||
|
|
@ -920,12 +920,12 @@ functions based on regular expressions.
|
|||
|
||||
.. method:: str.format(*args, **kwargs)
|
||||
|
||||
Perform a string formatting operation. The *format_string* argument can
|
||||
contain literal text or replacement fields delimited by braces ``{}``. Each
|
||||
replacement field contains either the numeric index of a positional argument,
|
||||
or the name of a keyword argument. Returns a copy of *format_string* where
|
||||
each replacement field is replaced with the string value of the corresponding
|
||||
argument.
|
||||
Perform a string formatting operation. The string on which this method is
|
||||
called can contain literal text or replacement fields delimited by braces
|
||||
``{}``. Each replacement field contains either the numeric index of a
|
||||
positional argument, or the name of a keyword argument. Returns a copy of
|
||||
the string where each replacement field is replaced with the string value of
|
||||
the corresponding argument.
|
||||
|
||||
>>> "The sum of 1 + 2 is {0}".format(1+2)
|
||||
'The sum of 1 + 2 is 3'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue