Raise GeneratorExit inside coroutine.
(self)
| 174 | raise val |
| 175 | |
| 176 | def close(self): |
| 177 | """Raise GeneratorExit inside coroutine. |
| 178 | """ |
| 179 | try: |
| 180 | self.throw(GeneratorExit) |
| 181 | except (GeneratorExit, StopIteration): |
| 182 | pass |
| 183 | else: |
| 184 | raise RuntimeError("coroutine ignored GeneratorExit") |
| 185 | |
| 186 | @classmethod |
| 187 | def __subclasshook__(cls, C): |
no test coverage detected