Skip to content

Convenience function to find the strongly connected component of a particular object #79

@mdickinson

Description

@mdickinson

Often I compute the collection of strongly connected components of a snapshot just to extract the SCC of a particular object:

snapshot = refcycle.snapshot()
scc = next(scc for scc in snapshot.strongly_connected_components() if object_of_interest in scc)

It would be great to be able to write scc = snapshot.scc_containing(object_of_interest) instead.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions