def __setitem__(self, index, value):
        """
        Only syntax sugar for user, not used inside HWT

        * In HW design is not used (__getitem__ returns "reference"
            and it is used)

        * In simulator is used _setitem__val directly
        """
        if isinstance(index, int):
            index = INT.fromPy(index)
        else:
            assert isinstance(self, Value)
            assert index._dtype == INT, index._dtype

        if not isinstance(value, Value):
            value = self._dtype.elmType.fromPy(value)
        else:
            assert value._dtype == self._dtype.elmType, (
                value._dtype, self._dtype.elmType)

        return self._setitem__val(index, value)
def __setitem__ ( self , index , value ) : if isinstance ( index , int ) : index = INT . fromPy ( index ) else : assert isinstance ( self , Value ) assert index . _dtype == INT , index . _dtype if not isinstance ( value , Value ) : value = self . _dtype . elmType . fromPy ( value ) else : assert value . _dtype == self . _dtype . elmType , ( value . _dtype , self . _dtype . elmType ) return self . _setitem__val ( index , value )
Only syntax sugar for user, not used inside HWT

        * In HW design is not used (__getitem__ returns "reference"
            and it is used)

        * In simulator is used _setitem__val directly