Click here for flowchart! (zoom to 50% for optimal viewing)
Shortened link for sharing -> https://bit.ly/cccflowchart
Below is a list of sources from where I compiled this flowchart, and should be good resources for you to understand it as well.
- https://docs.python.org/3.9/reference/datamodel.html#metaclasses
- https://docs.python.org/3.9/reference/datamodel.html#resolving-mro-entries
- https://www.python.org/dev/peps/pep-0560
- https://docs.python.org/3.9/reference/datamodel.html#determining-the-appropriate-metaclass
- https://docs.python.org/3.9/reference/datamodel.html#preparing-the-class-namespace
- https://www.python.org/dev/peps/pep-3115
- https://docs.python.org/3.9/reference/datamodel.html#executing-the-class-body
- https://docs.python.org/3.9/reference/datamodel.html#creating-the-class-object
- https://realpython.com/python-metaclasses/
"In the face of ambiguity, refuse the temptation to guess." -- TZOP, line 12
Thus, I've also ran numerous tests to clarify vague parts in the documentation, and the resulting flowchart should be pretty (perhaps not technically, but conceptually) accurate. That said, accuracy is one thing, but completeness I cannot guarantee. Which is why...
If you've found a flaw in the flowchart, or think there might be something to add, please don't hesitate to open up an issue! I'm open to any contribution and constructive criticism on this project, as I'd really like this graph to become a good resource for fellow Pythonistas.
This section will be updated as the project progresses.
TBD