[Python-checkins] r87202 - python/branches/py3k/Doc/library/logging.rst
Vinay Sajip
vinay_sajip at yahoo.co.uk
Mon Dec 13 09:25:09 CET 2010
Nick Coghlan <ncoghlan <at> gmail.com> writes:
> Minor nit - using asserts to check user input is generally a bad idea.
> A more explicit check might be a better example:
>
> if not isinstance(numeric_level, int):
> raise ValueError('Invalid log level: %s' % loglevel)
>
You're right, of course - I was being a bit lazy, after a long day :-)
Regards,
Vinay
More information about the Python-checkins
mailing list