Assertion in list comprehension
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Wed Aug 1 13:15:17 EDT 2007
On Wed, 01 Aug 2007 16:55:53 +0000, Stargaming wrote:
>> Thirdly: This sort of testing is precisely what unit tests and/or
>> doctests are for.
>
> Huh? What beginner is doing there seems more like input validation than
> testing. Unit or doctests are meant for testing (and in case of doctests,
> showing) whether a function works as expected.
If it is input validation I wouldn't expect it protected by a ``if
__debug__:``. That looks more like debugging/testing.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list