Message136509
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) |
|
Date |
User |
Action |
Args |
2011-05-22 10:09:26 | ekorn | set | recipients:
+ ekorn, docs@python |
2011-05-22 10:09:26 | ekorn | set | messageid: <1306058966.52.0.456848115548.issue12148@psf.upfronthosting.co.za> |
2011-05-22 10:09:25 | ekorn | link | issue12148 messages |
2011-05-22 10:09:25 | ekorn | create | |
|