summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-05 21:48:06 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-05 21:48:06 (GMT)
commit40e15edd65e1a08c3b6edcd6c00dc60239b5089d (patch)
tree367722b5a374b7f914601e1324aed34b7d34be40 /Doc/reference
parent0daf2f38cba2276c9a25613b47c46a17db614d6c (diff)
downloadcpython-40e15edd65e1a08c3b6edcd6c00dc60239b5089d.zip
cpython-40e15edd65e1a08c3b6edcd6c00dc60239b5089d.tar.gz
cpython-40e15edd65e1a08c3b6edcd6c00dc60239b5089d.tar.bz2
Merged revisions 69578-69580,69901,69907,69994,70022-70023,70025-70026,70166,70273,70275,70342,70386-70387,70389-70390,70392-70393,70395,70397,70400,70418 via svnmerge
........ r69578 | georg.brandl | 2009-02-13 12:03:59 +0100 (Fr, 13 Feb 2009) | 1 line #3694: add test for fix committed in r66693. ........ r69579 | georg.brandl | 2009-02-13 12:06:59 +0100 (Fr, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69580 | georg.brandl | 2009-02-13 12:10:04 +0100 (Fr, 13 Feb 2009) | 2 lines Fix warnings GCC emits where the argument of PyErr_Format is a single variable. ........ r69901 | georg.brandl | 2009-02-23 12:24:46 +0100 (Mo, 23 Feb 2009) | 2 lines #5349: C++ pure virtuals can also have an implementation. ........ r69907 | georg.brandl | 2009-02-23 19:33:48 +0100 (Mo, 23 Feb 2009) | 1 line Fix grammar. ........ r69994 | georg.brandl | 2009-02-26 18:36:26 +0100 (Do, 26 Feb 2009) | 1 line Document that setting sys.py3kwarning wont do anything. ........ r70022 | georg.brandl | 2009-02-27 17:23:18 +0100 (Fr, 27 Feb 2009) | 1 line #5361: fix typo. ........ r70023 | georg.brandl | 2009-02-27 17:39:26 +0100 (Fr, 27 Feb 2009) | 1 line #5363: fix cmpfiles() docs. Another instance where a prose description is twice as long as the code. ........ r70025 | georg.brandl | 2009-02-27 17:52:55 +0100 (Fr, 27 Feb 2009) | 1 line #5344: fix punctuation. ........ r70026 | georg.brandl | 2009-02-27 17:59:03 +0100 (Fr, 27 Feb 2009) | 1 line #5365: add quick look conversion table for different time representations. ........ r70166 | georg.brandl | 2009-03-04 19:24:41 +0100 (Mi, 04 Mär 2009) | 2 lines Remove obsolete stuff from string module docs. ........ r70273 | georg.brandl | 2009-03-09 15:25:07 +0100 (Mo, 09 Mär 2009) | 2 lines #5458: add a note when we started to raise RuntimeErrors. ........ r70275 | georg.brandl | 2009-03-09 17:35:48 +0100 (Mo, 09 Mär 2009) | 2 lines Add missing space. ........ r70342 | georg.brandl | 2009-03-13 20:03:58 +0100 (Fr, 13 Mär 2009) | 1 line #5486: typos. ........ r70386 | georg.brandl | 2009-03-15 22:32:06 +0100 (So, 15 Mär 2009) | 1 line #5496: fix docstring of lookup(). ........ r70387 | georg.brandl | 2009-03-15 22:37:16 +0100 (So, 15 Mär 2009) | 1 line #5493: clarify __nonzero__ docs. ........ r70389 | georg.brandl | 2009-03-15 22:43:38 +0100 (So, 15 Mär 2009) | 1 line Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int. ........ r70390 | georg.brandl | 2009-03-15 22:44:43 +0100 (So, 15 Mär 2009) | 1 line #5491: clarify nested() semantics. ........ r70392 | georg.brandl | 2009-03-15 22:46:00 +0100 (So, 15 Mär 2009) | 1 line #5488: add missing struct member. ........ r70393 | georg.brandl | 2009-03-15 22:47:42 +0100 (So, 15 Mär 2009) | 1 line #5478: fix copy-paste oversight in function signature. ........ r70395 | georg.brandl | 2009-03-15 22:51:48 +0100 (So, 15 Mär 2009) | 1 line #5276: document IDLESTARTUP and .Idle.py. ........ r70397 | georg.brandl | 2009-03-15 22:53:56 +0100 (So, 15 Mär 2009) | 1 line #5469: add with statement to list of name-binding constructs. ........ r70400 | georg.brandl | 2009-03-15 22:59:37 +0100 (So, 15 Mär 2009) | 3 lines Fix markup in re docs and give a mail address in regex howto, so that the recommendation to send suggestions to the author can be followed. ........ r70418 | georg.brandl | 2009-03-16 20:42:03 +0100 (Mo, 16 Mär 2009) | 1 line Add token markup. ........
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst9
-rw-r--r--Doc/reference/executionmodel.rst7
2 files changed, 9 insertions, 7 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index c13e802..7d5b7be 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1414,11 +1414,12 @@ Basic customization
.. index:: single: __len__() (mapping object method)
- Called to implement truth value testing, and the built-in operation ``bool()``;
+ Called to implement truth value testing and the built-in operation ``bool()``;
should return ``False`` or ``True``, or their integer equivalents ``0`` or
- ``1``. When this method is not defined, :meth:`__len__` is called, if it is
- defined (see below). If a class defines neither :meth:`__len__` nor
- :meth:`__nonzero__`, all its instances are considered true.
+ ``1``. When this method is not defined, :meth:`__len__` is called, if it is
+ defined, and the object is considered true if its result is nonzero.
+ If a class defines neither :meth:`__len__` nor :meth:`__nonzero__`, all its
+ instances are considered true.
.. method:: object.__unicode__(self)
diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst
index 0d15657..05f8b92 100644
--- a/Doc/reference/executionmodel.rst
+++ b/Doc/reference/executionmodel.rst
@@ -87,9 +87,10 @@ subclass of :exc:`NameError`.
The following constructs bind names: formal parameters to functions,
:keyword:`import` statements, class and function definitions (these bind the
class or function name in the defining block), and targets that are identifiers
-if occurring in an assignment, :keyword:`for` loop header, or in the second
-position of an :keyword:`except` clause header. The :keyword:`import` statement
-of the form "``from ...import *``" binds all names defined in the imported
+if occurring in an assignment, :keyword:`for` loop header, in the second
+position of an :keyword:`except` clause header or after :keyword:`as` in a
+:keyword:`with` statement. The :keyword:`import` statement
+of the form ``from ... import *`` binds all names defined in the imported
module, except those beginning with an underscore. This form may only be used
at the module level.