def getStateToCopy(self):
        state = self.__dict__.copy()
        state['tb'] = None
        state['frames'] = []
        state['stack'] = []
        state['value'] = str(self.value) # Exception instance
        if isinstance(self.type, str):
            state['type'] = self.type
        else:
            state['type'] = reflect.qual(self.type) # Exception class
        if self.unsafeTracebacks:
            state['traceback'] = self.getTraceback()
        else:
            state['traceback'] = 'Traceback unavailable\n'
        return state
Return only the integer part of a string.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/spread/pb.py/CopyableFailure.getStateToCopy--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/io/eeglab/eeglab.py/_strip_to_integer