def __rshift__(self, other):
        """Right shift by variable amount, :py:`self >> other`.

        Returns
        -------
        :class:`Value`, :py:`unsigned(len(self))`
            If :py:`self` is unsigned.
        :class:`Value`, :py:`signed(len(self))`
            If :py:`self` is signed.

        Raises
        ------
        :exc:`TypeError`
            If :py:`other` is signed.
        """
        other = Value.cast(other)
        other.__check_shamt()
        return Operator(">>", [self, other], src_loc_at=1)
Right shift by variable amount, :py:`self >> other`.

        Returns
        -------
        :class:`Value`, :py:`unsigned(len(self))`
            If :py:`self` is unsigned.
        :class:`Value`, :py:`signed(len(self))`
            If :py:`self` is signed.

        Raises
        ------
        :exc:`TypeError`
            If :py:`other` is signed.
        
amaranth/hdl/_ast.py