def __setitem__(self, item, value):
        """
        Short-hand for setting a range of bits in a bitfield. Note that the
        item **must** be a slice specifying the start and end of the range of
        bits to read. If the value representation exceeds the number of bits
        implied by the slice range, a ``ValueError`` is raised.
        """
        start, stop = self._validate_slice(item)
        nbits = stop - start
        if value >= (1 << nbits):
            raise ValueError('value exceeds width specified by slice')
        self.set('u%s' % nbits, start, value).execute()
def __setitem__ ( self , item , value ) : start , stop = self . _validate_slice ( item ) nbits = stop - start if value >= ( 1 << nbits ) : raise ValueError ( 'value exceeds width specified by slice' ) self . set ( 'u%s' % nbits , start , value ) . execute ( )
Short-hand for setting a range of bits in a bitfield. Note that the
        item **must** be a slice specifying the start and end of the range of
        bits to read. If the value representation exceeds the number of bits
        implied by the slice range, a ``ValueError`` is raised.