def __is_abstract(mcs):
    """
        Return True if the class has an attribute __abstract set to True.
        Subclasses will return False unless they themselves have
        __abstract set to true.  This mechanism allows a class to
        declare itself to be abstract (e.g. to avoid it being offered
        as an option in a GUI), without the "abstract" property being
        inherited by its subclasses (at least one of which is
        presumably not abstract).
        """
    try:
        return getattr(mcs, '_%s__abstract' % mcs.__name__)
    except AttributeError:
        return False
