@status.setter
    def status(self, value):
        if isinstance(value, (int, long)):
            if value>=100 and value<=999:
                st = _RESPONSE_STATUSES.get(value, '')
                if st:
                    self._status = '%d %s' % (value, st)
                else:
                    self._status = str(value)
            else:
                raise ValueError('Bad response code: %d' % value)
        elif isinstance(value, unicode):
            value = value.encode('utf-8')
        elif isinstance(value, str):
            if _RE_RESPONSE_STATUS.match(value):
                self._status = value
            else:
                raise ValueError('Bad response code: %s' % value)
        else:
            raise TypeError('Bad type of response code.')
Returns an Type trait.
dataset/ETHPy150Open michaelliao/transwarp/transwarp/web.py/Response.status--crossover with--dataset/ETHPy150Open enthought/traits/traits/trait_types.py/Type.__init__