| Conditions | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | from __future__ import absolute_import |
||
| 22 | def __call__(self, frame, kind, arg): |
||
| 23 | """ |
||
| 24 | The settrace function. |
||
| 25 | |||
| 26 | .. note:: |
||
| 27 | |||
| 28 | This always returns self (drills down) - as opposed to only drilling down when predicate(event) is True |
||
| 29 | because it might |
||
| 30 | match further inside. |
||
| 31 | """ |
||
| 32 | if self._handler is None: |
||
| 33 | raise RuntimeError("Tracer is stopped.") |
||
| 34 | |||
| 35 | self._handler(Event(frame, kind, arg, self)) |
||
| 36 | return self |
||
| 37 | |||
| 64 |