Hacker News new | past | comments | ask | show | jobs | submit login

I just discovered graphlib.TopologicalSorter the other day.

Nice! When you need it, you need it. It's nice not to have to implement it oneself.




Once I found myself needing to sort something topologically... and the interface to this sorter is so bad that you cannot really retrofit any kind of graph data to make it work with the sorter. So, it's kinda worthless, unless you specifically design your graph to be sorted with this sorter.

Also, topological sort is like five lines of code... so, it doesn't matter if the function is there.


Is this because graphlib.TopologicalSorter is “backwards” in the sense that it takes a dependency graph instead of an adjacency list? Or what didn’t you like about it?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: