This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, dam1784, eric.smith, python-dev, rhettinger, tim.peters
Date 2022-01-21.20:45:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642797933.76.0.355234969569.issue46071@roundup.psfhosted.org>
In-reply-to
Content
I think I can summarize:

Tim + Current Docs:

* static_order to return [A, B]
* Conceptual/abstract directed graph direction is A --> B
* A is a predecessor of B
* predecessor mapping to be passed is {B: [A]}

David suggests:

* static_order returns [A, B]
* Conceptual/abstract directed graph direction is B --> A
* mapping to be passed is {B: [A]}

It seems David places more value on the idea of the concrete mapping "pointing forwards" with respect to the abstract directed graph, while it seems Tim places more value on the idea of the abstract mapping direction corresponding to the final static order. These two goals are in conflict, assuming we don't want to change the behavior.

I think I agree more with Tim, since abstract graphs can be represented in lots of ways (set of pairs? adjacency matrix or its transpose? adjacency list/dict? Bi-directional mapping?), so the translation from the abstract to the concrete is a decent place for the "reversal".

It's very very standard for a topological sort to be conceptualized as taking a picture like
    A → B
    ↓   ↓
    C → D
and transforming it into a list/iterator like [A, B, C, D], and I think the conceptual consistency there should be preserved, even if the concrete representation of the abstract graph "points backwards".
History
Date User Action Args
2022-01-21 20:45:33Dennis Sweeneysetrecipients: + Dennis Sweeney, tim.peters, rhettinger, eric.smith, python-dev, dam1784
2022-01-21 20:45:33Dennis Sweeneysetmessageid: <1642797933.76.0.355234969569.issue46071@roundup.psfhosted.org>
2022-01-21 20:45:33Dennis Sweeneylinkissue46071 messages
2022-01-21 20:45:33Dennis Sweeneycreate