diff options
author | Georg Brandl <georg@python.org> | 2007-09-07 14:15:41 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-09-07 14:15:41 (GMT) |
commit | 96593ed348078403eb30fd5d2767fc96c17e913a (patch) | |
tree | f1221b6a26fb84fc1159ead1f4064fb7dc59a354 /Doc/library | |
parent | 44fa8f650f3a69318afe37874e82c6688f88e311 (diff) | |
download | cpython-96593ed348078403eb30fd5d2767fc96c17e913a.zip cpython-96593ed348078403eb30fd5d2767fc96c17e913a.tar.gz cpython-96593ed348078403eb30fd5d2767fc96c17e913a.tar.bz2 |
Continue going through the language reference, bringing it up-to-date.
In particular, document the new comprehensions and remove mentions of long integers.
Fix a bunch of related things in the lib ref.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/constants.rst | 12 | ||||
-rw-r--r-- | Doc/library/fileinput.rst | 4 | ||||
-rw-r--r-- | Doc/library/new.rst | 2 | ||||
-rw-r--r-- | Doc/library/readline.rst | 4 |
4 files changed, 17 insertions, 5 deletions
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index c36b2fa..634656a 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -5,6 +5,11 @@ Built-in Constants A small number of constants live in the built-in namespace. They are: +.. note:: + + :data:`None`, :data:`False`, :data:`True` and :data:`__debug__` cannot be + reassigned, so they can be considered "true" constants. + .. XXX False, True, None are keywords too .. data:: False @@ -37,3 +42,10 @@ A small number of constants live in the built-in namespace. They are: slicing syntax for user-defined container data types, as in :: val = container[1:5, 7:10, ...] + + +.. data:: __debug__ + + A boolean value that is :data:`True` if Python was not started with the + ``-O`` command line option. Its value is used indirectly by the + :keyword:`assert` statement, but it can also be used directly in code. diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index ba7e980..fd84139 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -19,10 +19,10 @@ The typical use is:: This iterates over the lines of all files listed in ``sys.argv[1:]``, defaulting to ``sys.stdin`` if the list is empty. If a filename is ``'-'``, it is also replaced by ``sys.stdin``. To specify an alternative list of filenames, pass it -as the first argument to :func:`input`. A single file name is also allowed. +as the first argument to :func:`.input`. A single file name is also allowed. All files are opened in text mode by default, but you can override this by -specifying the *mode* parameter in the call to :func:`input` or +specifying the *mode* parameter in the call to :func:`.input` or :class:`FileInput()`. If an I/O error occurs during opening or reading a file, :exc:`IOError` is raised. diff --git a/Doc/library/new.rst b/Doc/library/new.rst index 438329f..6153ff1 100644 --- a/Doc/library/new.rst +++ b/Doc/library/new.rst @@ -50,4 +50,4 @@ The :mod:`new` module defines the following functions: This function returns a new class object, with name *name*, derived from *baseclasses* (which should be a tuple of classes) and with namespace *dict*. - + Alias for the built-in :class:`type`. diff --git a/Doc/library/readline.rst b/Doc/library/readline.rst index ed2027d..7727c3b 100644 --- a/Doc/library/readline.rst +++ b/Doc/library/readline.rst @@ -12,8 +12,8 @@ The :mod:`readline` module defines a number of functions to facilitate completion and reading/writing of history files from the Python interpreter. This module can be used directly or via the :mod:`rlcompleter` module. Settings made using this module affect the behaviour of both the interpreter's -interactive prompt and the prompts offered by the :func:`raw_input` and -:func:`input` built-in functions. +interactive prompt and the prompts offered by the built-in :func:`input` +function. The :mod:`readline` module defines the following functions: |