[Python-checkins] r66564 - python/trunk/Doc/reference/expressions.rst

benjamin.peterson python-checkins at python.org
Tue Sep 23 15:32:46 CEST 2008


Author: benjamin.peterson
Date: Tue Sep 23 15:32:46 2008
New Revision: 66564

Log:
mention how to override boolean evaluation

Modified:
   python/trunk/Doc/reference/expressions.rst

Modified: python/trunk/Doc/reference/expressions.rst
==============================================================================
--- python/trunk/Doc/reference/expressions.rst	(original)
+++ python/trunk/Doc/reference/expressions.rst	Tue Sep 23 15:32:46 2008
@@ -1143,7 +1143,8 @@
 control flow statements, the following values are interpreted as false:
 ``False``, ``None``, numeric zero of all types, and empty strings and containers
 (including strings, tuples, lists, dictionaries, sets and frozensets).  All
-other values are interpreted as true.
+other values are interpreted as true.  (See the :meth:`~object.__nonzero__`
+special method for a way to change this.)
 
 .. index:: operator: not
 


More information about the Python-checkins mailing list