def __setitem__(self, index, value):
        """Set new value change corresponding property."""
        ### set item from sample rect using given index
        ### and value; this has the desired side-effect
        ### of the pygame.Rect instance performing type
        ### checking and error raising for us
        self._sample_rect[index] = value

        ### finally set new value for the property
        ### represented by the given index (note that we
        ### retrieve the value we just assigned to the
        ### sample_rect from it again; this way we take
        ### advantage of pygame.Rect type coercion)

        property_name = self._index_to_property[index]
        setattr(self, property_name, self._sample_rect[index])
Set new value change corresponding property.
nodezator/rectsman/special.py