mirror of
https://github.com/python/cpython.git
synced 2024-12-02 14:24:12 +08:00
8719ad5dde
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74277 | sean.reifschneider | 2009-08-01 18:54:55 -0500 (Sat, 01 Aug 2009) | 3 lines - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with NUL: Bogus TypeError detail string. ........ r74321 | guilherme.polo | 2009-08-05 11:51:41 -0500 (Wed, 05 Aug 2009) | 1 line Easier reference to find (at least while svn continues being used). ........ r74323 | guilherme.polo | 2009-08-05 18:48:26 -0500 (Wed, 05 Aug 2009) | 1 line Typo. ........ r74326 | jesse.noller | 2009-08-05 21:05:56 -0500 (Wed, 05 Aug 2009) | 1 line Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address ........ r74355 | gregory.p.smith | 2009-08-12 12:02:37 -0500 (Wed, 12 Aug 2009) | 2 lines comment typo fix ........ r74465 | vinay.sajip | 2009-08-15 18:23:12 -0500 (Sat, 15 Aug 2009) | 1 line Added section on logging to one file from multiple processes. ........ r74467 | vinay.sajip | 2009-08-15 18:34:47 -0500 (Sat, 15 Aug 2009) | 1 line Refined section on logging to one file from multiple processes. ........ r74488 | vinay.sajip | 2009-08-17 08:14:37 -0500 (Mon, 17 Aug 2009) | 1 line Further refined section on logging to one file from multiple processes. ........ r74492 | r.david.murray | 2009-08-17 14:26:49 -0500 (Mon, 17 Aug 2009) | 2 lines Issue 6685: 'toupper' -> 'upper' in cgi doc example explanation. ........ r74513 | skip.montanaro | 2009-08-18 09:37:52 -0500 (Tue, 18 Aug 2009) | 1 line missing module ref (issue6723) ........ r74531 | vinay.sajip | 2009-08-20 17:04:32 -0500 (Thu, 20 Aug 2009) | 1 line Added section on exceptions raised during logging. ........ r74549 | benjamin.peterson | 2009-08-24 12:42:36 -0500 (Mon, 24 Aug 2009) | 1 line fix pdf building by teaching latex the right encoding package ........ r74553 | r.david.murray | 2009-08-26 20:04:59 -0500 (Wed, 26 Aug 2009) | 2 lines Remove leftover text from end of sentence. ........ r74625 | benjamin.peterson | 2009-09-01 17:27:57 -0500 (Tue, 01 Sep 2009) | 1 line remove the check that classmethod's argument is a callable ........ r74632 | georg.brandl | 2009-09-03 02:27:26 -0500 (Thu, 03 Sep 2009) | 1 line #6828: fix wrongly highlighted blocks. ........ r74643 | georg.brandl | 2009-09-04 01:59:20 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. ........ r74644 | georg.brandl | 2009-09-04 02:55:14 -0500 (Fri, 04 Sep 2009) | 1 line #5047: remove Monterey support from configure. ........ r74647 | georg.brandl | 2009-09-04 03:17:04 -0500 (Fri, 04 Sep 2009) | 2 lines Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. ........ r74652 | georg.brandl | 2009-09-04 06:25:37 -0500 (Fri, 04 Sep 2009) | 1 line #6756: add some info about the "acct" parameter. ........ r74666 | georg.brandl | 2009-09-05 04:04:09 -0500 (Sat, 05 Sep 2009) | 1 line #6841: remove duplicated word. ........ r74671 | georg.brandl | 2009-09-05 11:47:17 -0500 (Sat, 05 Sep 2009) | 1 line #6843: add link from filterwarnings to where the meaning of the arguments is covered. ........ r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line #6865 fix ref counting in initialization of pwd module ........ r74739 | georg.brandl | 2009-09-11 02:55:20 -0500 (Fri, 11 Sep 2009) | 1 line Move function back to its section. ........
79 lines
2.4 KiB
ReStructuredText
79 lines
2.4 KiB
ReStructuredText
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 (assignments to them raise :exc:`SyntaxError`), so they can be
|
|
considered "true" constants.
|
|
|
|
.. XXX False, True, None are keywords too
|
|
|
|
.. data:: False
|
|
|
|
The false value of the :class:`bool` type. Assignments to ``False``
|
|
are illegal and raise a :exc:`SyntaxError`.
|
|
|
|
|
|
.. data:: True
|
|
|
|
The true value of the :class:`bool` type. Assignments to ``True``
|
|
are illegal and raise a :exc:`SyntaxError`.
|
|
|
|
|
|
.. data:: None
|
|
|
|
The sole value of :attr:`types.NoneType`. ``None`` is frequently used to
|
|
represent the absence of a value, as when default arguments are not passed to a
|
|
function. Assignments to ``None`` are illegal and raise a :exc:`SyntaxError`.
|
|
|
|
|
|
.. data:: NotImplemented
|
|
|
|
Special value which can be returned by the "rich comparison" special methods
|
|
(:meth:`__eq__`, :meth:`__lt__`, and friends), to indicate that the comparison
|
|
is not implemented with respect to the other type.
|
|
|
|
|
|
.. data:: Ellipsis
|
|
|
|
The same as ``...``. Special value used mostly in conjunction with extended
|
|
slicing syntax for user-defined container data types, as in ::
|
|
|
|
.. XXX Someone who understands extended slicing should fill in here.
|
|
|
|
|
|
.. data:: __debug__
|
|
|
|
This constant is true if Python was not started with an :option:`-O` option.
|
|
Assignments to :const:`__debug__` are illegal and raise a :exc:`SyntaxError`.
|
|
See also the :keyword:`assert` statement.
|
|
|
|
|
|
Constants added by the :mod:`site` module
|
|
-----------------------------------------
|
|
|
|
The :mod:`site` module (which is imported automatically during startup, except
|
|
if the :option:`-S` command-line option is given) adds several constants to the
|
|
built-in namespace. They are useful for the interactive interpreter shell and
|
|
should not be used in programs.
|
|
|
|
.. data:: quit(code=None)
|
|
exit(code=None)
|
|
|
|
Objects that when printed, print a message like "Use quit() or Ctrl-D
|
|
(i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
|
|
specified exit code.
|
|
|
|
.. data:: copyright
|
|
license
|
|
credits
|
|
|
|
Objects that when printed, print a message like "Type license() to see the
|
|
full license text", and when called, display the corresponding text in a
|
|
pager-like fashion (one screen at a time).
|
|
|