def asxc(cls, obj):
        """Convert object into Xcfunc."""
        if isinstance(obj, cls): return obj
        if is_string(obj): return cls.from_name(obj)
        raise TypeError("Don't know how to convert <%s:%s> to Xcfunc" % (type(obj), str(obj)))
Convert object into Xcfunc.