MCPcopy Index your code
hub / github.com/RustPython/RustPython / close

Method close

Lib/_collections_abc.py:382–390  ·  view source on GitHub ↗

Raise GeneratorExit inside generator.

(self)

Source from the content-addressed store, hash-verified

380 raise val
381
382 def close(self):
383 """Raise GeneratorExit inside generator.
384 """
385 try:
386 self.throw(GeneratorExit)
387 except (GeneratorExit, StopIteration):
388 pass
389 else:
390 raise RuntimeError("generator ignored GeneratorExit")
391
392 @classmethod
393 def __subclasshook__(cls, C):

Callers

nothing calls this directly

Calls 1

throwMethod · 0.95

Tested by

no test coverage detected