[docs] [issue16304] re: Match Objects always have a boolean value of True

R. David Murray report at bugs.python.org
Tue Oct 23 14:41:10 CEST 2012


R. David Murray added the comment:

Since the quoted paragraph is distant from where the information about the ``None`` return is documented, the wording of the quoted paragraph can be improved to make this clearer:

Match Objects always have a boolean value of ``True``.  Since ``None`` (which has a boolean value of ``False``) is returned when there is no match, you can test whether there was a match with a simple ``if`` statement.

----------
nosy: +r.david.murray
versions: +Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16304>
_______________________________________


More information about the docs mailing list