| 436 | sys._getframe(1)) |
| 437 | |
| 438 | def __repr__(self): |
| 439 | info = ['StreamReader'] |
| 440 | if self._buffer: |
| 441 | info.append(f'{len(self._buffer)} bytes') |
| 442 | if self._eof: |
| 443 | info.append('eof') |
| 444 | if self._limit != _DEFAULT_LIMIT: |
| 445 | info.append(f'limit={self._limit}') |
| 446 | if self._waiter: |
| 447 | info.append(f'waiter={self._waiter!r}') |
| 448 | if self._exception: |
| 449 | info.append(f'exception={self._exception!r}') |
| 450 | if self._transport: |
| 451 | info.append(f'transport={self._transport!r}') |
| 452 | if self._paused: |
| 453 | info.append('paused') |
| 454 | return '<{}>'.format(' '.join(info)) |
| 455 | |
| 456 | def exception(self): |
| 457 | return self._exception |