Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mdickinson opened this issue Jun 29, 2020 · 0 comments

Comments

@mdickinson
Copy link
Owner

mdickinson commented Jun 29, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant