MCPcopy Index your code
hub / github.com/python/cpython / leaves

Method leaves

Lib/test/test_exception_group.py:686–687  ·  view source on GitHub ↗
(exc)

Source from the content-addressed store, hash-verified

684 self.assertIsInstance(rest, BaseExceptionGroup)
685
686 def leaves(exc):
687 return [] if exc is None else [e for e,_ in leaf_generator(exc)]
688
689 # match and subgroup have the same leaves
690 self.assertSequenceEqual(leaves(match), leaves(sg))

Callers

nothing calls this directly

Calls 1

leaf_generatorFunction · 0.85

Tested by

no test coverage detected