Skip to content

Remove broken docs link to Wikipedia article on C3 linearization order #16033

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

Merged
merged 1 commit into from
May 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/contracts/inheritance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ Multiple Inheritance and Linearization

Languages that allow multiple inheritance have to deal with
several problems. One is the `Diamond Problem <https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem>`_.
Solidity is similar to Python in that it uses "`C3 Linearization <https://en.wikipedia.org/wiki/C3_linearization>`_"
Solidity is similar to Python in that it uses C3 Linearization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this topic is obscure enough that we should either link to something here or have our own explanation.

I found this, which perhaps could be a replacement: The Python 2.3 Method Resolution Order

I haven't read it in its entirety yet though, so I'm not sure it matches that removed old Wikipedia article, but our MRO was inspired by Python, so it should be the same thing.

to force a specific order in the directed acyclic graph (DAG) of base classes. This
results in the desirable property of monotonicity but
disallows some inheritance graphs. Especially, the order in
Expand Down