[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

Christian Heimes report at bugs.python.org
Tue Dec 2 22:15:12 CET 2008


Christian Heimes <lists at cheimes.de> added the comment:

The patch looks fine. However I propose to replace the assert statement
with a proper check that raises a meaningful exception.

if not hasattr(lock, 'acquire'):
    raise AttributeError("'%r' has no method 'acquire'" % lock)

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4449>
_______________________________________


More information about the Python-bugs-list mailing list