@classmethod
def _class_local(cls, name, default):
    """
        Returns an attribute directly associated with this class
        (as opposed to subclasses), setting default if necessary
        """
    result = cls.__dict__.get(name, default)
    setattr(cls, name, result)
    return result
