An alternative constructor which raises the given error

def raises(cls, sender, attrname, error, args=ANYTHING, kwargs=ANYTHING):
        "An alternative constructor which raises the given error"
        def raise_error():
            raise error
        return cls(sender, attrname, returns=Invoke(raise_error), args=ANYTHING, kwargs=ANYTHING)