def __bool__(self):  
return bool(self._ex_dict)<EOL>
Return :code:`False` if exception handler is empty, :code:`True` otherwise.

.. note:: This method applies to Python 3.x

For example:

    >>> from __future__ import print_function
    >>> import pexdoc
    >>> obj = pexdoc.ExHandle()
    >>> if obj:
    ...     print('Boolean test returned: True')
    ... else:
    ...     print('Boolean test returned: False')
    Boolean test returned: False
    >>> def my_func(exhobj):
    ...     exhobj.add_exception('test', RuntimeError, 'Message')
    >>> my_func(obj)
    >>> if obj:
    ...     print('Boolean test returned: True')
    ... else:
    ...     print('Boolean test returned: False')
    Boolean test returned: True