def registerAdapter(adapterFactory, origInterface, *interfaceClasses):
    from nevow.util import _namedAnyWithBuiltinTranslation, _NamedAnyError
    
    isStr = type(adapterFactory) is str
    if (type(origInterface) is str) != isStr:
        raise ValueError("Either all arguments must be strings or all must be objects.")
    
    for interfaceClass in interfaceClasses:
        if (type(interfaceClass) is str) != isStr:
            raise ValueError("Either all arguments must be strings or all must be objects.")

    if isStr:
        # print "registerAdapter:",adapterFactory, origInterface, interfaceClasses
        adapterFactory = _namedAnyWithBuiltinTranslation(adapterFactory)
        origInterface = _namedAnyWithBuiltinTranslation(origInterface)
        interfaceClasses = [_namedAnyWithBuiltinTranslation(x) for x in interfaceClasses]

    if interfaceClasses in 'nevow.inevow.ISerializable' or filter(
            lambda o: getattr(o, '__name__', None) == 'ISerializable', interfaceClasses):
        warnings.warn("ISerializable is deprecated. Please use nevow.flat.registerFlattener instead.", stacklevel=2)
        from nevow import flat
        flat.registerFlattener(adapterFactory, origInterface)
    _registerAdapter(adapterFactory, origInterface, *interfaceClasses)
dataset/ETHPy150Open twisted/nevow/nevow/compy.py/registerAdapter/swapped operands of `in`