def __setattr__(self, name, value):
        """Assigns attribute :py:`name` of the unflipped interface to :py:`value`.

        Performs :py:`setattr(unflipped, name, value)`, with the following caveats:

        1. If :py:`name` refers to a signature member, the assigned interface object is flipped.
        2. If :py:`name` refers to a property setter, its :py:`self` argument receives the flipped
           interface.
        """
        if (name in self.__unflipped.signature.members and
                self.__unflipped.signature.members[name].is_signature):
            setattr(self.__unflipped, name, flipped(value))
        else:
            try: # descriptor first
                _gettypeattr(self.__unflipped, name).__set__(self, value)
            except AttributeError:
                setattr(self.__unflipped, name, value)
Assigns attribute :py:`name` of the unflipped interface to :py:`value`.

        Performs :py:`setattr(unflipped, name, value)`, with the following caveats:

        1. If :py:`name` refers to a signature member, the assigned interface object is flipped.
        2. If :py:`name` refers to a property setter, its :py:`self` argument receives the flipped
           interface.
        
amaranth/lib/wiring.py