def __init__(self, etype, value, tb, **options):
<EOL>self.options = XTracebackOptions(**options)<EOL>self.etype = etype<EOL>self.value = value<EOL>if self.options.chain and self.value is not Noneand hasattr(traceback, "<STR_LIT>"):<EOL><INDENT>values = list(traceback._iter_chain(value, tb))<EOL>values[-<NUM_LIT:1>] = (values[-<NUM_LIT:1>][<NUM_LIT:0>], tb)<EOL><DEDENT>else:<EOL><INDENT>values = [(value, tb)]<EOL><DEDENT>self.number_padding = <NUM_LIT:0><EOL>self.exceptions = []<EOL>for value, tb in values:<EOL><INDENT>if not isinstance(self.etype, basestring)and isinstance(value, basestring):<EOL><INDENT>exc_type = value<EOL>value = None<EOL><DEDENT>else:<EOL><INDENT>exc_type = etype if value == self.value else type(value)<EOL><DEDENT>exc = XTracebackExc(exc_type, value, tb, self)<EOL>self.exceptions.append(exc)<EOL>self.number_padding = max(exc.number_padding, self.number_padding)<EOL><DEDENT>self._lexer = None<EOL>self._formatter = None<EOL>if self.options.print_width is not None:<EOL><INDENT>self.print_width = self.options.print_width<EOL><DEDENT>elif fcntl is not None and self.tty_stream:<EOL><INDENT>self.print_width = struct.unpack(<EOL>'<STR_LIT>',<EOL>fcntl.ioctl(self.options.stream,<EOL>termios.TIOCGWINSZ,<EOL>struct.pack('<STR_LIT>', <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)),<EOL>)[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>self.print_width = DEFAULT_WIDTH<EOL><DEDENT>
:param etype: The exception type
:type etype: type
:param value: The exception instance
:type value: Exception
:param tb: The traceback instance
:type tb: traceback
:param options: Options for this instance
:type options: dict