This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ekorn
Recipients docs@python, ekorn
Date 2011-05-22.10:09:25
SpamBayes Score 0.0013740201
Marked as misclassified No
Message-id <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za>
In-reply-to
Content
Combining multiple option flags to doctest.testmod(optionflags=...) requires the bitwise or operator |, not plain "or". I therefore suggest rewording "or-ing together individual option flags." to "or-ing together individual option flags, using the 'bitwise or' operator |.", perhaps with a link to http://docs.python.org/reference/expressions.html#binary-bitwise-operations.

Example:

"""
Doctest option flags must be or-ed together with '|', not 'or'.

>>> print "A  B  C"
A B...
"""
import doctest

print "Combining option flags using bitwise '|'..."
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
print "Combining option flags using logical 'or'..."
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE or doctest.ELLIPSIS)
History
Date User Action Args
2011-05-22 10:09:26ekornsetrecipients: + ekorn, docs@python
2011-05-22 10:09:26ekornsetmessageid: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za>
2011-05-22 10:09:25ekornlinkissue12148 messages
2011-05-22 10:09:25ekorncreate