Title: Explain graphlib's cycle-finding code · Issue #143948 · python/cpython · GitHub
Open Graph Title: Explain graphlib's cycle-finding code · Issue #143948 · python/cpython
X Title: Explain graphlib's cycle-finding code · Issue #143948 · python/cpython
Description: Feature or enhancement Proposal: The topsort in graphlib has a novel iterative cycle-finding algorithm that's O() time- and space- optimal. It's not obvious, though, and it's overdue for me to explain it. So add appropriate comments. Has...
Open Graph Description: Feature or enhancement Proposal: The topsort in graphlib has a novel iterative cycle-finding algorithm that's O() time- and space- optimal. It's not obvious, though, and it's overdue for me to expl...
X Description: Feature or enhancement Proposal: The topsort in graphlib has a novel iterative cycle-finding algorithm that's O() time- and space- optimal. It's not obvious, though, and it's overdue fo...
Opengraph URL: https://github.com/python/cpython/issues/143948
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Explain graphlib's cycle-finding code","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nThe topsort in graphlib has a novel iterative cycle-finding algorithm that's O() time- and space- optimal. It's not obvious, though, and it's overdue for me to explain it. So add appropriate comments.\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-143950\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/tim-one","@type":"Person","name":"tim-one"},"datePublished":"2026-01-17T01:03:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/143948/cpython/issues/143948"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c8d24338-b177-859d-d6e0-f6d5dfdc4b43 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA4A:2A7CEE:6CD41EC:8DE0CE6:696D93DC |
| html-safe-nonce | a83551f56d1c8235f43177af57d5227375d2d8073f29a27c7a77e0cc62b3dba0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTRBOjJBN0NFRTo2Q0Q0MUVDOjhERTBDRTY6Njk2RDkzREMiLCJ2aXNpdG9yX2lkIjoiNzQ1OTY3MzE4MTk5NjgxNTMyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1f78631b3bbf43fe0c58e9c60f7eddc0f5aade2794e058ab45ee60ec7e72f280 |
| hovercard-subject-tag | issue:3824154135 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/143948/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2fa0ffeb9dcd05b3bb4ede63a7d2a4cd9a6c13169c381614546d0faaa4f38493/python/cpython/issues/143948 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2fa0ffeb9dcd05b3bb4ede63a7d2a4cd9a6c13169c381614546d0faaa4f38493/python/cpython/issues/143948 |
| og:image:alt | Feature or enhancement Proposal: The topsort in graphlib has a novel iterative cycle-finding algorithm that's O() time- and space- optimal. It's not obvious, though, and it's overdue for me to expl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tim-one |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4922b452d03cd8dbce479d866a11bc25b59ef6ee2da23aa9b0ddefa6bd4d0064 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7e5ae23c70136152637ceee8d6faceb35596ec46 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width