def __setitem__(self, index, value):
if isinstance(index, int):<EOL><INDENT>index = INT.fromPy(index)<EOL><DEDENT>else:<EOL><INDENT>assert isinstance(self, Value)<EOL>assert index._dtype == INT, index._dtype<EOL><DEDENT>if not isinstance(value, Value):<EOL><INDENT>value = self._dtype.elmType.fromPy(value)<EOL><DEDENT>else:<EOL><INDENT>assert value._dtype == self._dtype.elmType, (<EOL>value._dtype, self._dtype.elmType)<EOL><DEDENT>return self._setitem__val(index, value)<EOL>
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