[issue14705] Add 'bool' format character to PyArg_ParseTuple*
Eric V. Smith
report at bugs.python.org
Fri May 4 14:28:34 CEST 2012
Eric V. Smith <eric at trueblade.com> added the comment:
Now that I think about this some more, I think I'd structure the 'p' tests as:
for expr in [False, None, True, 1, 0]: # add the rest
self.assertEqual(bool(expr), getargs_p(expr))
Since the salient point is that 'p' returns the same value as bool(), right?
And for the one that raises an exception, you'll have to check that bool and getargs_p both raise the same type of exception.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14705>
_______________________________________
More information about the Python-bugs-list
mailing list